Duplicate Records in Combo Box

D

David

I am getting duplicate records in my combo box. I am not
understanding why this is happening, my SQL Statement is
as follows......

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

It is still showing multiple Supervisors in the combo box,
this has gotten rid of them for me before and am not sure
what is going on now that it wont work.
 
R

Rick B

Do you have multiple "id"s with the same supervisor?

I believe your code will pull only distinct id's.


Rick B


I am getting duplicate records in my combo box. I am not
understanding why this is happening, my SQL Statement is
as follows......

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

It is still showing multiple Supervisors in the combo box,
this has gotten rid of them for me before and am not sure
what is going on now that it wont work.
 
J

John Vinson

I am getting duplicate records in my combo box. I am not
understanding why this is happening, my SQL Statement is
as follows......

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

It is still showing multiple Supervisors in the combo box,
this has gotten rid of them for me before and am not sure
what is going on now that it wont work.

If the ID is the Primary Key of Table1, you'll get one record for each
distinct ID - no matter how many of them share the same supervisor.

If you want only one record per Supervisor, just remove Table1.ID from
the 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