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
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
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.
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()))
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.