Filter in Report

W

wal50

My report takes product history and does a average calculation involving
several fieilds for each product over a 6 month period. (each record is for
one product and one month). Based upon the results of the calculation, the
reports makes a recommendation (> nnn = yes, <= NNN =no). Works fine.
Now, I only want the No's to print.

If the calcs/recommendation were done in the source query I could filter it
that way. I want to do the calculations in the report rather than the source
query if possible - meaning I'm too lazy to do it all over.
Any ideas?

Thanks in advance.

wal50
 
R

Ray

Presumably you use the DoCmd.OpenReport method to open the report. Add a
where condition to the command. SOmething like this:

DoCmd.OpenReport "ReportName",,,"X <= NNN"
 
W

wal50

Thanks for the quick response. I still am missing something. I have

Function mcrNoFilterFR()

With CodeContextObject
' filter for no
DoCmd.OpenReport "rptMinutesPlanReviewFRSavings", , , "[Text206] >
361"
End With

End Function

Report name is correct, control 206 is correct. but nothing happens. I tried
it with and without Function mcrNoFilterFR() as the On Open property of the
report. No joy.

Must be something simple but I am missing it.

Thanks again
wal50
 

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