Applying filters in a report

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​
 
K

Klatuu

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'"​
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top