Query searches range of dates

teiben

Registered User.
Local time
Today, 19:17
Joined
Jun 20, 2002
Messages
462
I have a query, though it doesn't work right, and I don't understand it.
I need a query that will search a date field 7 days prior and 7 days to the future:

I have Between Date()-800 And DateAdd("d",7,Date())


What does the -800 mean?
 
No idea what the 800 means

Think criteria of

between Now()-7 and Now()+7 may work. Will probably need some brackets
un there somewhere

len
 
Date()-800 will begin your search 800 days prior to the previous date, which is not what you want. Between Date()-7 and Date()+7 should get you what you want.
 
This is what you have:
Code:
Between Date()-800 And DateAdd("d",7,Date())

This is what you SHOULD have:

Code:
Between DateAdd("d", -7, Date()) And DateAdd("d",7,Date())
________
330
 
Last edited:

Users who are viewing this thread

Back
Top Bottom