I don't seem to be able to set the filter or filteron properties in VB for a subreport.
I have tried doing it in the parent report Open event, the parent report Detail section format event and the child report Open event.
In all cases I get a Run-time Error 2101 - The setting you entered isn't valid for this property. Even if the only line of code is:
Me.FilterOn = True
However, the following line does not give me an error:
msgbox Me.FilterOn
What could I be doing wrong here?
Ultimately, I am trying to open a report from a form and display all the data for a given year in the subreport. What I'd really like to do is apply the following filter to the subreport:
me.filter = "AllocationYear = " & Forms![OpenAllocationReport].AllocYear
me.filteron = true
Help?
Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
I have tried doing it in the parent report Open event, the parent report Detail section format event and the child report Open event.
In all cases I get a Run-time Error 2101 - The setting you entered isn't valid for this property. Even if the only line of code is:
Me.FilterOn = True
However, the following line does not give me an error:
msgbox Me.FilterOn
What could I be doing wrong here?
Ultimately, I am trying to open a report from a form and display all the data for a given year in the subreport. What I'd really like to do is apply the following filter to the subreport:
me.filter = "AllocationYear = " & Forms![OpenAllocationReport].AllocYear
me.filteron = true
Help?
Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt