Your problem is that Date() is today's date at MIDNIGHT. So unless you have
a record with that exact date and time you won't get any records returned.
Try one of the following
OK (but cannot use any index on the field - with a lot of records - 20,000
or more - it can be slow)
Field: JustTheDate: IIF(IsDate(YourDateField),DateValue(YourDateField),Null)
Criteria: Date()
or this variant
Field: JustTheDate: Format(YourDateField, "Short Date")
Criteria: = Format(Date(),"Short Date")
Better (in theory could return records from tomorrow at midnight):
Field: YourDateField
Criteria: Between Date() and DateAdd("d",1, Date())
Even better (should not return records from tomorrow midnight):
Field: YourDateField
Criteria: >= Date() and < DateAdd("d",1, Date())
jahoobob via AccessMonster.com said:
Date() should work. Did you place a space between Date and ()? You
shouldn't.
[Date] format 8/9/2006 8:27:55 AM
I would like to have a query that when I run it it only returns the
records that the current date. I do not want to prompt for date.
If I just use Date () as the critera I get no returns.
Thanks