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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Question 3

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I have an update query that strips the last two digits off a number.

in the criteria i have put Date()

it all works fine. but if they forget to run the query until the next day I whole day would be skipped. since
Date() is the criteria. Is there a way to do Date() and Date()-1?? I tryed that and it wont work.

Thanks DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
It seems to me that you should use something besides date as criteria. If the update query is run twice on the same date will it strip two more digits off the number? Whatif if the query isn't run for two days?
 
thats not the case. it inserts it into another field.

I just want to know how to run todays date and yesterdays date only. DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 

How did you set up the query with date() and date()-1? I just created a query in Access 2000 and it ran fine. I'm certain it would work in Access 97, also.

SELECT Dates.Date1
FROM Dates
WHERE Dates.Date1=Date() Or Dates.Date1=Date()-1;
Terry L. Broadbent
Life would be easier if I had the source code. -Anonymous
 
In your critera section enter this (on one line)

Date() or Date()-1
 
This would work as well!

Between Date()-1 And Date()

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top