date criteria

G

Guest

Hi,

Here are the two fields in my query
"
![date from]" "
![amount]"

the criteria for "
![date from]" is
"between #[forms]![text1]# and #[forms]![text2]#"

"[text1]" is the begining of the week and "[text2]" is the ending of the week

Thursday and Wednesday resecptivly

I need to be able to run this query at any time during the week to see the
records added so far for that week.

This query works just fine, all I have to do in enter the coresponding dates
to "[text1]" and "[text2]" each time I load the "[form]"

What I would like to do is NOT have to enters those dates each time I load
the "[form]"

How can I make the criteria read
"between #[Last Thurday]# and #[Next Wednesday]#"
for what ever the current week happen to be?

Please don't tell me "date() - 7", I need to be able to run this query at
any time during the week and get a "current week to date" return.

Many Thanks
 
J

John Vinson

How can I make the criteria read
"between #[Last Thurday]# and #[Next Wednesday]#"
for what ever the current week happen to be?
Try:

= DateAdd("d", -DatePart("w", Date(), vbThursday), Date()) AND DateAdd("d", 8-DatePart("w", Date(), vbThursday), Date())


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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