I think your idea would work fine.
Nothing in the logic is appearing to fail for your business rule.
Dateserial lets you convert a date by year, month and day.
When adding or subtracting values from each section it will move the entire item intot he next month or year.
It expects the format of (year + or - x, month + or - x, day + or - x)
dateserial(year(currentdate),month(currentdate)-3,1)
the current year, current month -3 months and the 1st day of the month.
dateserial(year(currentdate),month(currentdate),1-1)
the current year, current month and the 1st day of the month -1 day which is the last day of the previous month regardless of the number of days in that month.
Edited by DBlank - 05 Jan 2012 at 4:44am