View Single Post
  #2  
Old December 18th, 2006, 08:51 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Combo-Box Duplicates

On Mon, 18 Dec 2006 12:40:00 -0800, JonBake32 wrote:

I have referenced a Combo-Box in my form to a table and my problem is a
larger version of this:

Lets say I have three names I will ever enter in a combo box: Apples,
Oranges, and Bananas. How do I format the drop-down so that it ONLY displays
the three names:
Apples
Oranges
Bananas

Instead of displaying all of the duplicates that are in that field such as:
Apples
Apples
Apples
Oranges
Oranges
Bananas
Bananas

Thank you.


Make the rowsource of the combo box a Distinct query, i.e.

Select Distinct TableName.FieldName From TableName Order by
[FieldName];

Change the table and field names as needed.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail