Remove duplicate options in combo box

T

TJ

I am trying to create a form that contains a combo box. The combo box data
source is a singl field query that contains all of the family names found in
the database. In the database, there are numerous entries that have the same
family name.

My combo box lists all of the family names as many times as they occur in
the database. I only want each family name to appear once. Also, I want
the user to be able to add entries even if the new entry contains a family
name not in list. How do I set this up?
 
A

Allen Browne

You probably have a query for the Row Source of the combo?
In that query set the Unique Values property to Yes.
(In query design open the Properties box (View menu.))
Alternatively to to SQL View (View menu) and add the word DISTINCT:
SELECT DISTINCT [FamilyName] FROM ...

To allow the user to type something that is not in the combo's list, set its
Limit To List property to No.
 
Top