Duplicates in a drop down box (1 Viewer)

JahJr

Andy
Local time
Today, 15:05
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
 

David Eagar

Registered User.
Local time
Tomorrow, 07:05
Joined
Jul 2, 2007
Messages
924
Create a query with the fields you need, string from the field and Group By to 'remove' duplicates
 

JahJr

Andy
Local time
Today, 15:05
Joined
Dec 3, 2008
Messages
93
I forgot to mention I am a novice please explain string
 

David Eagar

Registered User.
Local time
Tomorrow, 07:05
Joined
Jul 2, 2007
Messages
924
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).
 

JahJr

Andy
Local time
Today, 15:05
Joined
Dec 3, 2008
Messages
93
Here is what I have now.

SELECT [Logged Sales].Date
FROM [Logged Sales]
 

David Eagar

Registered User.
Local time
Tomorrow, 07:05
Joined
Jul 2, 2007
Messages
924
Check DataQuery and then LookupQuery in attached db
 

Attachments

  • sample.zip
    14 KB · Views: 80

JahJr

Andy
Local time
Today, 15:05
Joined
Dec 3, 2008
Messages
93
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?
 

JahJr

Andy
Local time
Today, 15:05
Joined
Dec 3, 2008
Messages
93
Got it. Thanks
SELECT [Logged Sales].Date
FROM [Logged Sales]
GROUP BY [Logged Sales].Date;
 

Users who are viewing this thread

Top Bottom