Date criteria (1 Viewer)

AlexN

Registered User.
Local time
Today, 03:17
Joined
Nov 10, 2014
Messages
302
I have a table with a field TDate (dd/mm/yyyy format). A query with calculated fields is lying on this table.

I want to put a date criteria in this query, by a combobox in an unbound form, where the date format has to be “mmmm/yyyy” and has to be updated as new TDates come in.

Trying to pick up values for the combobox from the TDates field (and formatting them), I get a list with several same values. This is of course expected as there are many records on the same month, even on the same day of the month.
Is there a way to have this list with unique values for each TDates month/year?


Thank you
 

MarkK

bit cruncher
Local time
Yesterday, 17:17
Joined
Mar 17, 2004
Messages
8,186
Try
Code:
SELECT DISTINCT Date1 FROM tTable
Also, a date/time field in a table is stored as a number. Formats are only applied when the date is displayed.
 

AlexN

Registered User.
Local time
Today, 03:17
Joined
Nov 10, 2014
Messages
302
Try
Code:
SELECT DISTINCT Date1 FROM tTable
Also, a date/time field in a table is stored as a number. Formats are only applied when the date is displayed.



:) Thank you! Works fine as criteria too!
Always helpful!
Thanks again
 

Users who are viewing this thread

Top Bottom