filtering for subreport

tMitch

Registered User.
Local time
Today, 17:49
Joined
Sep 24, 2002
Messages
43
Hi -

I have a filter that works in the Subreport when it stands alone but gives me an error when I put the Subreport into the Main Report. The Subreport is not linked to the Mainreport.

My filter in the Subreport, in the OnOpen Event procedure is:

Me.Filter = "Comments Like '*XX*'"
FilterOn = True

How should this be written to work so that it works in the Mainreport and should I write it in the OpenEvent for the Subreport or for the Mainreport?

I tried using Reports![MainReport]![SubReport].Filter = in the SubReport Event, but no luck.

I wanted to use a filter instead of query criteria because I don't want the criteria in the Mainreport which references the same query.

Any suggestions? Thanks.
:confused:
 
The problem is the reference.
I have not used a reference to a subreport and I'm guessing here, but try...

Reports![MainReport]![SubReport].Report.Filter

I couldn't locate any example in Access help. See what happens. It can't hurt.
 

Users who are viewing this thread

Back
Top Bottom