Run a query based on a start date and end date. The date are the .

S

santana

In access 2000, I trying to run a query based on a start date and an end
date. The start date is Monday from previous week and the end date is Monday
from current week. Is there a way to automate the query?
 
R

Rick Brandt

In access 2000, I trying to run a query based on a start date and an end
date. The start date is Monday from previous week and the end date is
Monday from current week. Is there a way to automate the query?

Monday of "this week"...
DateAdd("d", -((WeekDay(Date(), vbSunday)-2)), Date())


Monday of "last week"...
DateAdd("d", -((WeekDay(Date(), vbSunday)))-5, Date())

(both assume the week starts on Sunday)
 
S

santana

Rick, I used your suggestion and i get the following error message: "The
expression you entered has a function containing the wrong number of
arguments. I used the dateadd function in the criteria of the query in the
"package approved date field" with the "Between" function.
 

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