Prevent duplicates in List Box

G

Guest

Hello ...

I have form that a clerk uses for employee's calling in sick or late. The
clerk select either the sick or late check box and the cursor so to a List
Box that lists all of the departments exists in a station. By typing the
first letter ... etc .... This then feeds a combo box limited by the
department name you selected above.

It works fine ... but there are hundreds of duplicates in the list. Is
there any way to prevent the dups????

Thanks and Happy New Year
 
S

Steve Schapel

Jerry,

I assume the Row Source of the Listbox is a Query? Open the design view
of the query, right-click anywhere in the upper panel of the query
design window, and set the Unique Values property to Yes. See if that
fixes it. If not, please post back with details of the Listbox's Row
Source.
 
J

John Vinson

It works fine ... but there are hundreds of duplicates in the list. Is
there any way to prevent the dups????

Sure. Base the combo box on a DISTINCT query to limit it to one row
per value. What's the combo's rowsource, or how are you setting the
dependency with the listbox?

John W. Vinson[MVP]
 

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