A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Prevent duplicates in List Box



 
 
Thread Tools Display Modes
  #1  
Old January 1st, 2007, 03:45 AM posted to microsoft.public.access.forms
Jerry Mc Cauley
external usenet poster
 
Posts: 12
Default Prevent duplicates in List Box

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

--
Jerry
  #2  
Old January 1st, 2007, 04:52 AM posted to microsoft.public.access.forms
Steve Schapel
external usenet poster
 
Posts: 1,422
Default Prevent duplicates in List Box

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.

--
Steve Schapel, Microsoft Access MVP

Jerry Mc Cauley wrote:
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

  #3  
Old January 1st, 2007, 04:53 AM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Prevent duplicates in List Box

On Sun, 31 Dec 2006 19:45:00 -0800, Jerry Mc Cauley
wrote:

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]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.