I have an access 2007 report where the Default View property is set to Report View. I have an unbound textbox on the same report where the Control Source is "=[Report].[Filter]". When the report is run, any field can be filtered by right-clicking the field and selecting appropriate criteria.
The unbound textbox then displays the filters as created:
Filters: (([qryAllRecords].[strLastName] Like "a*")) AND ([qryAllRecords].[DOB]>=#2/1/2011#). Right click a filtered field and select "Clear filter from [fieldname]". The filter is cleared and the unbound textbox is dynamically updated. If no filters remain, it is blank.
In the user environment, I do not want the user to have access to the shortcut menus, so I created a ribbon for the report that has a group with these idMsos:
<control idMso="FiltersMenu" label="Filter" enabled="true"/>
<control idMso="FilterClearAllFilters" label="Undo Filter" enabled="true"/>.
These work to filter and remove filters in the report similar to using the shortcut menus. When a filter is applied the unbound textbox is updated. However, the FilterClearAllFilters does NOT dynamically update the unbound textbox displaying the filter. Only when the report is closed and then re-opened does the unbound textbox display correctly.
The integrity of the report depends on the filter displaying correctly. Does anyone know how to modify the idMso or add some other code to dynamically update the unbound textbox when using the ribbon?
Thank you!
The unbound textbox then displays the filters as created:
Filters: (([qryAllRecords].[strLastName] Like "a*")) AND ([qryAllRecords].[DOB]>=#2/1/2011#). Right click a filtered field and select "Clear filter from [fieldname]". The filter is cleared and the unbound textbox is dynamically updated. If no filters remain, it is blank.
In the user environment, I do not want the user to have access to the shortcut menus, so I created a ribbon for the report that has a group with these idMsos:
<control idMso="FiltersMenu" label="Filter" enabled="true"/>
<control idMso="FilterClearAllFilters" label="Undo Filter" enabled="true"/>.
These work to filter and remove filters in the report similar to using the shortcut menus. When a filter is applied the unbound textbox is updated. However, the FilterClearAllFilters does NOT dynamically update the unbound textbox displaying the filter. Only when the report is closed and then re-opened does the unbound textbox display correctly.
The integrity of the report depends on the filter displaying correctly. Does anyone know how to modify the idMso or add some other code to dynamically update the unbound textbox when using the ribbon?
Thank you!