Date selection

A

Annette

Is there a way to select data for everything that happened yesterday
through now? So if I was running it at 5:30am on 02/13/2009, I would
get everything that happened beginning at the start of the day
02/12/2009(seconds after midnight 02/11/2009) through 5:30am
02/13/2009. I understand that I would be duplicating midnight through
now (5:30am) when I run this report tomorrow at the same time, but
that is ok.
 
D

Douglas J. Steele

Assuming you're got an appropriate date field, you can use a WHERE clause
along the lines of:

WHERE MyDateField > DateDiff("d", -1, Now())
 
J

John Spencer

There is no automatic date and time added to a record when it is created
or when it is modified. Your table design would need to include such a
field and you would need to do all data entry via forms to ensure that
the field was updated as appropriate.

Once you had such a field in each table you could use criteria such as
the following against a date field in the table.
=DateAdd("D",-1,Date())

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Top