Remove Dups in a ComboBox

P

Popsie Robinson

I have a combobox in a form that links to a column in a table. The column
is called FULL NAME. There are several instances of the same name and I
want the combobox to only show each FULL NAME once. Right now it brings up
10 John Doe's, 20 Mary Spikes etc... Is there an easy way to do this?

Thanks!!
 
S

StCyrM

You could use a SELECT DISTINCT <fieldName>

However I'm wondering why do some names show up more than once? Is it that you
have the same name with a different address, for example?

Maurice
 
P

Popsie

It is a table generated by a timeclock, so each time they punch the clock
they have a new record. That is how they get duplicated.

How do I configure the ComboBox to use SELECT DISTINCT <fieldName> ?


Thanks for the help!!
 
J

John Vinson

I have a combobox in a form that links to a column in a table. The column
is called FULL NAME. There are several instances of the same name and I
want the combobox to only show each FULL NAME once. Right now it brings up
10 John Doe's, 20 Mary Spikes etc... Is there an easy way to do this?

I suspect your table design needs work! You should have a *SEPARATE
TABLE* for employee names, in which each employee has one and only one
record; the combo box would be based on this table. Having the
employee's full name listed repeatedly in your table is not taking
advantage of the relational nature of Access. Suppose an employee gets
married and changes their name? You have to track down all the places
it's stored.

That said...

Create a Query based on your table. Select only the FULL NAME field.
On the Menu select View... Properties. Set the "Unique Values"
property to True.

You'll now see each name only once, even if you have two employees who
happen to have the same name (another problem with your current table
design).
 

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