Duplicates in a drop down box

JahJr

Andy
Local time
Today, 08:41
Joined
Dec 3, 2008
Messages
93
I have a table that has a list of dates. Most of the dates are listed multiple times. example
1/1/09 TV 399.95
1/1/09 TV 185.99
2/5/09 TV 133.99
1/1/09 TV 222.99

I need a list box in a form that will let me select a date. From the data sample above there should only be items in the list box
1/1/09
2/5/09
 
Create a query with the fields you need, string from the field and Group By to 'remove' duplicates
 
I forgot to mention I am a novice please explain string
 
OK is this data
1/1/09 TV 399.95
1/1/09 TV 185.99
2/5/09 TV 133.99
1/1/09 TV 222.99

all in one field, or several fields? If one, you need to select the first 6 characters out of the data - In a query, select the field with the data, add a new variable (dt) and enter it as dt:=left(fieldname,6).
 
Here is what I have now.

SELECT [Logged Sales].Date
FROM [Logged Sales]
 
This makes a little more sense but my data table is seperated into 3 columns.
Date
Item
Price
Do I still need the data query?
 
Got it. Thanks
SELECT [Logged Sales].Date
FROM [Logged Sales]
GROUP BY [Logged Sales].Date;
 

Users who are viewing this thread

Back
Top Bottom