Setting Subreport filters from Parent Filter

vendredi 24 avril 2015

I have a report which is opened using a DoCmd.OpenReport. There's a criteria string which filters the main report - this works fine.

There's now a requirement to place a summary subform at the beginning of the report, in the report header. I need that summary to use the same criteria string as the main report.

For the main report's OnLoad I put:

Me!Expenditure_By_Type_Subreport.Report.Filter = Me.Filter

But I get the error message:
Error 2101
The setting you entered isn't valid for this property.

I tried it the other way round as well - in the OnOpen of the subreport I tried:
Me.Filter = Me.Parent.Filter
And it gives the same error.

When I just a manual Filter change such as:
Me.Filter = "Project_ID Is Not Null"
Setting Subreport filters from Parent Filter

0 commentaires:

Enregistrer un commentaire

Labels