Query for specified time interval

  • Thread starter Thread starter Ashley
  • Start date Start date
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
 
Try reversing the expression so that the earlier date is the first "date" in
the expression:
Between DateAdd("ww",-10,Date()) And Date()
 
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


.
 
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


.
 
Back
Top