Week ending date query help

M

Mike.Kanet

I am trying to build a query in Access 2007 that will display all
records that fall within a certain week, based on a week ending date.
The week ending date needs to be a variable. Here is what I have so
far, but I'm trying to simplify it.

Between [Enter start date] and [Enter end date]

I was hoping to have the user just input one date (the week ending
date), instead of entering the start date and then the end date. I
tried this, but it didn't work:

Between [Enter Week Ending Date] and ([Enter Week Ending Date] - 6)

Does any one know an easier way of setting the criteria for this
query? Thanks!
 
M

Marshall Barton

I am trying to build a query in Access 2007 that will display all
records that fall within a certain week, based on a week ending date.
The week ending date needs to be a variable. Here is what I have so
far, but I'm trying to simplify it.

Between [Enter start date] and [Enter end date]

I was hoping to have the user just input one date (the week ending
date), instead of entering the start date and then the end date. I
tried this, but it didn't work:

Between [Enter Week Ending Date] and ([Enter Week Ending Date] - 6)

Does any one know an easier way of setting the criteria for this
query?

That seems pretty easy to me.

There are more complicated ways to do it, but what you have
(but put the earlier date first) is ok.

OTOH, eventually you will probably want to use a form text
box to specify the week ending date instead of the pop up
prompt. To use a text box on a for, change the criteria to:

Between Forms!theform.thetextbox-6 And
Forms!theform.thetextbox
 

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