I actually prefer
Code:
WHERE [County Master List].[Date Opened] between DateSerial(year(now())-3, 4, 1) and DateSerial(year(now()), 3, 31)
over
Code:
WHERE [County Master List].[Date Opened] between DateSerial((datepart("yyyy",now()))-3, 4, 1) and DateSerial((datepart("yyyy",now())), 3, 31)
Would it be possible to insert and iff statement within this where clause that would pull the current month and depending on if the month is December change the formula to the following:
WHERE [County Master List].[Date Opened] between DateSerial((datepart("yyyy",now()))
-2, 4, 1) and DateSerial((datepart("yyyy",now())), 3, 31)
Basically to subtract 2 years instead of three
Try:
Code:
WHERE [County Master List].[Date Opened] between DateSerial(year(now())-IIf(Month(Now())=12,2,3), 4, 1) and DateSerial(year(now()), 3, 31)