Combo-Box Duplicates
Oops, sorry Fred, just noticed that it does display alphabetically, must have
had a senior moment there. Thanks for the post, it really helped me.
"Minnie M" wrote:
Hi Fred, I tried this and received an error message saying ‘Syntax Error
(operator missing)’, so I inserted square brackets around each instance of
TableName and FieldName, and it works!
I’d now like to make the list display in alphabetical order, can I do that?
"fredg" wrote:
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
|