Query for specified time interval

A

Ashley

Date By Week: DatePart("ww",[tblName].[Date]) in my field.
I want the query to get records 10 weeks prior to today.
Between Date() And DateAdd("ww",-10,Date()) in my Criteria.
After I ran the query, no records show up.
Please help!
Thanks
 
K

Ken Snell

Try reversing the expression so that the earlier date is the first "date" in
the expression:
Between DateAdd("ww",-10,Date()) And Date()
 
G

Guest

I tried reversing the expression. It didn't work!
I tried to add a Date field with Between DateAdd("ww",-
10,Date()) And Date()in criteria. It queries the specific
time interval but it did not group and sum the records.
The records were grouping and summing ok before.
-----Original Message-----
Try reversing the expression so that the earlier date is the first "date" in
the expression:
Between DateAdd("ww",-10,Date()) And Date()


--

Ken Snell
<MS ACCESS MVP>


Date By Week: DatePart("ww",[tblName].[Date]) in my field.
I want the query to get records 10 weeks prior to today.
Between Date() And DateAdd("ww",-10,Date()) in my Criteria.
After I ran the query, no records show up.
Please help!
Thanks


.
 
K

Ken Snell

Are you sure that you have records in the table that match the criterion
that you've specified?

Try hard-coding the actual date values into the expression and see if it's
working.
--

Ken Snell
<MS ACCESS MVP>

I tried reversing the expression. It didn't work!
I tried to add a Date field with Between DateAdd("ww",-
10,Date()) And Date()in criteria. It queries the specific
time interval but it did not group and sum the records.
The records were grouping and summing ok before.
-----Original Message-----
Try reversing the expression so that the earlier date is the first "date" in
the expression:
Between DateAdd("ww",-10,Date()) And Date()


--

Ken Snell
<MS ACCESS MVP>


Date By Week: DatePart("ww",[tblName].[Date]) in my field.
I want the query to get records 10 weeks prior to today.
Between Date() And DateAdd("ww",-10,Date()) in my Criteria.
After I ran the query, no records show up.
Please help!
Thanks


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top