This depends whether the DateField has non-zero time component or not. If
the Field stores date-only, you can use:
WHERE [DateField]
BETWEEN DateAdd("d", -7, Date()) AND Date()
If the Field stores non-zero time component, use:
WHERE [DateField]
BETWEEN DateAdd("d", -7, Date()) AND Now()
assuming you want Records up to now. If you want Records up to the end of
the day (23:59:59), use:
WHERE ([DateField] >= DateAdd("d", -7, Date()))
AND ([DateField] < DateAdd("d", 1, Date()))
--
HTH
Van T. Dinh
MVP (Access)
Tim said:
This should be easy, but I've got "brainfreeze"....
What's the correct syntax to get records with a date
Between today and 7 days ago??