I am at a loss this morning.
In a query how do I write the statement :
I am looking in a field that a request for something has been sent. I want to look up anything between the current date =NOW() and what has been requested during the last 7 days .
Something like BETWEEN (=NOW() and anything requested during the last 7 days)
no matter how I write it it doesn't happen.
one of those days.
thanks for looking at this and any advise!
Access 2007 query question
-
- 2StarLounger
- Posts: 170
- Joined: 05 Feb 2010, 18:04
- Location: Jacksonville, NC
Access 2007 query question
If you can't convince them, confuse them - Harry S. Truman
Nannette
Nannette
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 2StarLounger
- Posts: 170
- Joined: 05 Feb 2010, 18:04
- Location: Jacksonville, NC
Re: Access 2007 query question
ah...thank you Hans. makes sense!
:)
:)
If you can't convince them, confuse them - Harry S. Truman
Nannette
Nannette
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Access 2007 query question
One thing to keep in mind: Between includes the lower and upper bounds. So if you want to select requests that have been sent less than 7 days ago, use
Between Date()-6 And Date()
Between Date()-6 And Date()
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 482
- Joined: 24 Jan 2010, 15:02
- Location: Colorado, USA
Re: Access 2007 query question
Adding to Hans' caution - if you use Now() to populate the field you need to be aware that it includes the time as well as the date. Thus if you use Date() in your criteria, you may miss a record entered today.
Wendell
You can't see the view if you don't climb the mountain!
You can't see the view if you don't climb the mountain!