Hi,
I've searched Google high-and-low trying to find my answer but haven't had any luck. I'm posting as a last resort hoping there's an easy answer to this and I can avoid doing this with multiple queries.
Everything I've done in Access has been self-taught, so please bare with me. The company I work for has a proprietary program written by a local programmer in Pervasive SQL. The daily users have a generic interface he built for data entry, etc. but, in order to get reports from the system, I have to use Access via ODBC links.
Ideally, I want my query to determine what today is (Mon-Fri) and pull the previous weekday, today and the next weekday's data. So...
Monday's report would pull the previous Fri, today(Mon) and Tues
Tuesday's report would pull Mon, today(Tues) and Wed
Friday's report would pull Thurs, today(Fri) and Mon
Unfortunately, no matter what I do, I can not get this to work. Based off the information I've pulled from my Google searches, I'm thinking it needs to look something like this...
IIf(Weekday(Date())=2,{If True},{If False})
It works fine if the True/False statements are single dates (ex: Date()+1, Date()-3, etc.) but when I try to define a range of dates (Between Date()-3 and Date()+1), it comes back blank.
Any thoughts on what I'm doing wrong? I've easily spent over 8 hours in the last week trying to figure this out. Most of the time I can find my answer by searching Google but this one has me stumped.
I appreciate any help you can provide. Thanks!
Matt