View Full Version : Help with Macro to Filter by Today, This Week, ...


pmcleod
09-07-2005, 05:39 AM
Good day to everyone. This site continues to be constant source of inspiration and learning. :)

I'm a PMP who uses Access, from time to time, to develop applications to help me with project management. Based on my limited knowledge, I do ok, from time to time. :o

I seldom use macros, however found one that I'm trying to modify, with little success. I've already tried VBA with even less success. :(

I have a main from that has a cbobox with: "All";"Today";"This Week";"Last Week";"This Month";"Last Month"

Using the "Today" example I have a macro that needs to filter a subform within the main form.

Here is the Marco:

Condition = [Forms]![IssuesSelectionAndReporting]![OpenedDateFilter]="Today"

Action = ApplyFilter

Where Condition = [Forms]![IssuesSelectionAndReporting]![IssuesSelectionSubform](Year([Opened Date])=Year(Date()) And Month([Due Date])=Month(Date()) And Day([Opened Date])=Day(Date()))

My error is Unidentified function '[Forms]![IssuesSelectionAndReporting]![IssuesSelectionSubform]' in expression.

Can someone help me with my syntax?

Thank you, in advance.