Remove Dups in a ComboBox

  • Thread starter Thread starter Popsie Robinson
  • Start date Start date
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!!
 
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
 
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!!
 
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).
 
Back
Top