Applying filters in a report

  • Thread starter Thread starter TU_Mike
  • Start date Start date
T

TU_Mike

I have a report that is sourced to a query. Now in the report properties
there is a filter property and I want to further restrict data to the report
at this point. I want to first do a simple sub-string extract and then
compare the result to a fixed value. For example my filter command would be
as follows:

Mid(
,3,2) = "02"

So anytime the sub-string returns an "02" then I want that data in the report.

Any help is appreicated and thanks!
Mike​
 
The best way to filter reports is to use the Where argument of the OpenReport
method. Do you use any where conditions in your query or any filtering in
the report. The Where arguement is like an SQL Where clause without the word
where, so it would look something like:

Docmd.OpenReport "MyReportName", , , "Mid(
,3,2) = '02'"​
 
Back
Top