C
cw via AccessMonster.com
I use the following WHERE clause in an Auto-Generated Report (it is always
based on Yesterday's Data):
WHERE (((qrySalesReport_AllCatg.Date)=Date()-1))
This works for Tue, Wed, Thu, Fri, but fails on Mon because of the weekend.
On Monday, I have to manually change the code to:
WHERE (((qrySalesReport_AllCatg.Date)=Date()-3))
Question: How do I change the SQL code to make the WHERE clause ask what day
is it, and if it is Monday, then use -3, otherwise use -1?
Thanks,
cw
based on Yesterday's Data):
WHERE (((qrySalesReport_AllCatg.Date)=Date()-1))
This works for Tue, Wed, Thu, Fri, but fails on Mon because of the weekend.
On Monday, I have to manually change the code to:
WHERE (((qrySalesReport_AllCatg.Date)=Date()-3))
Question: How do I change the SQL code to make the WHERE clause ask what day
is it, and if it is Monday, then use -3, otherwise use -1?
Thanks,
cw