date range

G

Glenda

I am currently running a query that pulls out data based on a date range. I
have been asked to automate this process. I'm not sure how to handle my date
range. I export the query on Tuesday for the previous Fri., Sat., Sun., and
Mon. I send the query again on Friday for the range Tue., Wed., and Thurs.

Any ideas on how to set this up to automatically figure the date ranges
based on the days of the week?
 
K

KARL DEWEY

You probably shoud use two queries in case you do it late.

This will give you FRI, SAT, & SUN even if done on MON, TUES, WED, or THRU.
Between (Date()-Weekday(Date()))-1 And (Date()-Weekday(Date()))+1

This will give you TUES, WED, &THRU even if done on FRI, SAT, or SUN.
Between (Date()-Weekday(Date()))-4 And (Date()-Weekday(Date()))-2
 
Top