remove duplicates from drop down list

G

Guest

I have a form with a drop down lists of names that are in the Sponsor Name
field of my table. I have the Row Source type is set to Table/Query and the
Row Source is set to:

SELECT [Games of Chance - Master Table].[Sponsor's Name] FROM [Games of
Chance - Master Table] ORDER BY [Sponsor's Name];

I use this to help with the data entry, but several records have the same
name, so the same name is listed multiple times in the drop down list, how
can I remove the duplicates from the drop down list?
 
G

Guest

Change to SELECT DISTINCT[Games of Chance - Master Table].[Sponsor's Name]
FROM [Games of Chance - Master Table] ORDER BY [Sponsor's Name];
The disctinct will give unique values
 
G

Guest

Hi Ginny -- You can use either the DISTINCT or GROUP BY clause...

SELECT DISTINCT [Games of Chance - Master Table].[Sponsor's Name] FROM
[Games of Chance - Master Table] ORDER BY [Sponsor's Name];

or

SELECT [Games of Chance - Master Table].[Sponsor's Name] FROM [Games of
Chance - Master Table] GROUP BY [Sponsor's Name] ORDER BY [Sponsor's Name];

However, I am unable to tell you what the technical differences between the
two. Hopefully an MVP can shed some light on the subject...
 
G

Guest

THANK YOU BOTH, THAT WORKED FANTASTIC!!!
--
Ginny


schasteen said:
Change to SELECT DISTINCT[Games of Chance - Master Table].[Sponsor's Name]
FROM [Games of Chance - Master Table] ORDER BY [Sponsor's Name];
The disctinct will give unique values

Ginny said:
I have a form with a drop down lists of names that are in the Sponsor Name
field of my table. I have the Row Source type is set to Table/Query and the
Row Source is set to:

SELECT [Games of Chance - Master Table].[Sponsor's Name] FROM [Games of
Chance - Master Table] ORDER BY [Sponsor's Name];

I use this to help with the data entry, but several records have the same
name, so the same name is listed multiple times in the drop down list, how
can I remove the duplicates from the drop down 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