Dublicate Records in Combo Box

D

Dave

On my form I have a combo box that looks up a field from a
table, the combo box is displaying duplicate records in
it. I can't get those duplicates to go away, here is my
SQL Statement.....

SELECT DISTINCTROW Table1.ID, Table1.Supervisor FROM
Table1 WHERE (((Table1.Supervisor) Is Not Null));

Even with the DISTINCTROW I am still getting the
duplicates, I am almost positive that got rid of it
before. Am I missing a property perhaps? Can anyone help
me.

Thanks,

Dave
 
K

Ken Snell [MVP]

Try this SQL statement:

SELECT DISTINCT Table1.ID, Table1.Supervisor FROM Table1 WHERE
(((Table1.Supervisor) Is Not Null));

DISTINCTROW returns records that are unique for all fields in the query's
table(s), whether you're showing those fields or not. DISTINCT returns
records that are unique for just the fields that are being displayed.
 
K

Ken Snell [MVP]

Then define what you mean by duplicate.... both fields in a row have the
same value in more than one row? Or what? Post examples of table's data and
of what you're seeing in the combo box's dropdown list.
 

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