Eliminate multiple entries in dropdown list

G

Guest

I have a dropdown list in one form for company names pulled from a client
list. The client list will have many clients from the same company. When
the dropdown list retreives the information the company name is repeated
several times (for each record created in the client list) Is there any way
to remove the duplicates? I'm new so take it easy on me :)

Karen
 
R

Rick Brandt

Karen said:
I have a dropdown list in one form for company names pulled from a
client list. The client list will have many clients from the same
company. When the dropdown list retreives the information the
company name is repeated several times (for each record created in
the client list) Is there any way to remove the duplicates? I'm new
so take it easy on me :)

Karen

In the design of the query being used as the RowSource of the ComboBox open the
property sheet and set Unique Values to Yes.
 
S

Steve Schapel

Karen,

I think you are referring to a combobox. If you look at the Properties
of the combobox, you will see it has a Row Source property, which I
expect at the moment may be your Clients table (or whatever it's
called). You can make a query based on the Clients table, and add the
Company Name (or whatever it's called) field to the query design grid.
In design view of the query, right click in the upper panel, and select
Properties from the pop-up menu. Change the Unique Values property
setting to Yes. Save the query. Then, enter the name of this query in
the Row Source property of your combobox. Alternatively, you can just
enter a SQL statement directly into the combobox's Row Source property.
It will be something like this...
SELECT DISTINCT [Company Name] FROM [Clients]
 
G

Guest

Awesome, thanks, it works

Steve Schapel said:
Karen,

I think you are referring to a combobox. If you look at the Properties
of the combobox, you will see it has a Row Source property, which I
expect at the moment may be your Clients table (or whatever it's
called). You can make a query based on the Clients table, and add the
Company Name (or whatever it's called) field to the query design grid.
In design view of the query, right click in the upper panel, and select
Properties from the pop-up menu. Change the Unique Values property
setting to Yes. Save the query. Then, enter the name of this query in
the Row Source property of your combobox. Alternatively, you can just
enter a SQL statement directly into the combobox's Row Source property.
It will be something like this...
SELECT DISTINCT [Company Name] FROM [Clients]

--
Steve Schapel, Microsoft Access MVP
I have a dropdown list in one form for company names pulled from a client
list. The client list will have many clients from the same company. When
the dropdown list retreives the information the company name is repeated
several times (for each record created in the client list) Is there any way
to remove the duplicates? I'm new so take it easy on me :)

Karen
 

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