query records between weeks

A

Ashley

Date By Week: DatePart("ww",[tblFinalTest].[Date]) in
Field. This would show all records.
But I want to have criteria to query records between today
and back 10 weeks. I try
Between Date() And DateAdd("ww",-10,Date()) in Criteria.
This returns no record.
Please help!
 
J

John Spencer (MVP)

Small sequence error, The two dates must be in order of oldest to more recent.
So reverse the position of your two dates.

Between DateAdd("ww",-10,Date()) And Date()
 
V

Van T. Dinh

Don't put the criteria in the "Date By Week" Column. In an empty Column,
select the [Date] Field in the Field row and in the criteria row, add:

BETWEEN DateAdd("ww", -10, Date()) AND Date()


Notes:
1. You can check / uncheck the "Show" button to show hide the value in the
DatasheetView of the Query.
2. "Date" is a bad choice for Field names as you can see above (reserved
word for an inbuilt function). Suggest you change the Field name to
something else.
 

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