Multiple/duplicate entries in a combo box

  • Thread starter Thread starter visionstate
  • Start date Start date
V

visionstate

Hi there,
I have inserted a combo box in a form which refers to a column in a
query.
The problem I have is that because it refers to a colum that has
duplicate entries, the combo box list is huge and contains a huge
amount of duplicate names. Is there a way of filtering these out so
there is only 1 of each name displayed?
Thanks for reading.
 
Add the word DISTINCT to the combo's RowSource, right after SELECT.

Example:
SELECT DISTINCT Field1 FROM Table1 WHERE Field1 Is Not Null ORDER BY
Field1;
 
Hi Allen.
Thanks for the speedy reponse!
In my 'Row Source' all it says is 'Combo Query' (the query I am
referring to) and when I click the '...' next to it, it takes me to the
design page of the query where I just tick the fields I want included
(in this case, 1 field called 'Department').
How would I work your code into this?
Thanks again!
 
It's ok now. I deleted it and re-entered and now the code has
appeared...strange! Thanks a lot for your help though, been searching
the net for this answer all day!
 

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

Back
Top