Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query for todays date 1

Status
Not open for further replies.

slammer14

IS-IT--Management
Jun 27, 2001
40
CA
I want to do a query for the current date. I want to show all the records for that day.

But not sure how, criteria=Date() does not seem to work

THanks slammer
 
I assume on your Criteria line you put =Date() and not Criteria = Date().
What is the format for you field? Is it mm/dd/yy or similar or does it contain the time as well? If your date field contains Time as well, you will not be able to Date() as the criteria. You would need to add a field to the query
MyNewDateField:Format([YourDateField],"mm/dd/yy") and then on the criteria line for this field put
=Date()

 
OK, the input mask is short date. However the datatype is date/tiem. I am still not sure.

Right now it prints all the invoices.

Thanks for answering quickly

slammer
 
Datatype date/time is fine and the Short Date is fine. On the criteria line for your query you should put
=Date()

that's all it should take to return any records with todays date in them.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top