Expression for current week

Y

Yasmin Nora

Would like to know the expression to use in an Access
query to run a weekly report that will display data for
only the 5 business days of the current week. Thanks
 
P

PC Datasheet

Not all weeks have 5 business days! You have to build a table of holidays and
include that table in you expression to exclude any holidays that fall in the
current week.
 
J

John Vinson

Would like to know the expression to use in an Access
query to run a weekly report that will display data for
only the 5 business days of the current week. Thanks

Bearing in mind PC Datasheet's cogent suggestion about holidays,
here's an expression that returns the range from the most recent
Monday to the next Friday:
= DateAdd("d", 1 - DatePart("w", Date(), vbMonday), Date())
AND <= DateAdd("d", 5 - DatePart("w", Date(), vbMonday), Date())

If the query is run on a weekend it will return the previous week.
 

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