Displaying Filter Criteria In Report Header?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have one report layout "rptStandard" that when it is opened I would like to
display the filter criteria in the header. Is there a way to do this?
 
You can put this into the ControlSource of a text box:
=[Report].[Filter]

Trouble is, sometimes the Filter property contains an artifact from a
previous filter, even though the filter is not applied. On a form you could
sort this out by testing the FilterOn property, but Access doesn't maintain
this property reliably for reports.

A better solution is to pass the filter to the report in its OpenArgs (or
use a public string variable for Access 2000 or earlier.) Here's some sample
code that does that (as well as some other stuff):
http://allenbrowne.com/AppPrintMgtCode.html#OpenTheReport
 
Back
Top