ACCESS 2000 AND THE DATE FUNCTION

R

RRS

We receive data from our corporate office, in an Excel spread sheet with the
date and time the data was collected in one cell. That data is then appended
into Access. We need a query that will filter out all records except the ones
from yesterdays date. We have tried using Date()-1 in the Criteria row of the
Date field and DateAdd("d",Date(),-1), but the query is always blank. Does
anyone have any suggestions?
 
G

Graham R Seach

WHERE DateField = Date()-1
....should work, but my guess is that the cells in Excel are formatted as
text. In that case, the following should work:
WHERE CDate(DateField) = Date()-1

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Office DevCon 2007. Sydney, Australia 3rd-4th Nov. Will you be there?
http://www.block.net.au/devcon/index.htm
 
Top