Hiding Duplicates in a Combo box

D

David

how do you keep a combo box from showing duplicate names?
I have a combobox bound to a field and it pulls the names in that field,
sometimes the name may appear more than once.
 
K

Kirk P.

In the row source property of your combo box, make sure your SQL statement is
SELECT DISTINCT, not merely SELECT.
 
M

Marshall Barton

David said:
how do you keep a combo box from showing duplicate names?
I have a combobox bound to a field and it pulls the names in that field,
sometimes the name may appear more than once.


Use the DISTINCT predicate in the combo box's RowSource
query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top