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!

Show field where date is = to yesterday

Status
Not open for further replies.

LebronJames

Programmer
Apr 5, 2003
93
I have two fields, lname and dateentered. I want to have a query in Access 2000 that will display only the names where the DateEntered is dated yesterday... somthing like currentdate -1
 
Design view of your query - in "criteria" enter date()-1

Let them hate - so long as they fear... Lucius Accius
 
Something like this ?
SELECT lname FROM theTable WHERE DateEntered = Date() - 1;
If DateEntered has time value:
SELECT lname FROM theTable WHERE Int(DateEntered) = Int(Date()) - 1;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top