Query records between weeks

G

Guest

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!
 
M

Michel Walsh

Hi,


Under your field [Date], get the criteria:

BETWEEN Date() -10 AND Date()



Note that your field Date and the function Date have a very similar name...
you try to confuse Access? You may succeed. Seriously, it would have been
better to use FinalDate or something like that, instead of just Date, for
your field name.


Actually, it seems you try to see if the week number, say 25, is between
today

? CLng(Date())
38153


and today less 10, 38143. Clearly,

25 between 38153 AND 38143


return false.


Hoping it may help,
Vanderghast, Access MVP
 

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