Filter: Previous/Next Month

MayaMana

Registered User.
Local time
Yesterday, 22:47
Joined
May 29, 2012
Messages
60
I am trying to figure out how to apply a filter using a button on a report so that when someone clicks the arrow it filters the query populating the report to the previous month or the next month of the current month on the report.

I have it so that the report opens up to the current month. I have a macro with
Code:
ApplyFilter
Where Condition: Year([Date])=Year(Date()) And Month([Date])=Month(Date())

I have been able to get it to change to just the previous and just the next month (In this case June, and August), by
Code:
Year([Date])=Year(Date()) And Month([Date])=Month(DateAdd("m",+1,Date()))
or -1
However I cannot seem to figure out how to get it to be based off of the current month showing on the report rather then the actual current month.

Any help is appreciated.
 

Users who are viewing this thread

Back
Top Bottom