ClaraBarton
Registered User.
- Local time
- Yesterday, 19:33
- Joined
- Oct 14, 2019
- Messages
- 645
I have both a subform and a subreport that are not connected to the parent form by a field. I keep the form open and populate the fields in the report and that works well but I cannot filter the subreport. I've read a great deal on this and I think this should work:
It doesn't. I tried it on the open event in the subreport. I read that it has to be in the open event and not the load event of the parent report. Neither works.
I had a variable for the Report form but read that doesn't work. (it doesn't) The error I get is #438 object doesn't support this property.
Any suggestions
Code:
Private Sub Report_Open(Cancel As Integer)
Dim sfrm As Access.Form
Set sfrm = Forms!frmCalendarMain!frmCalendarWeek.Form
Reports!rptWeek!rsubWeek.Report.Filter = sfrm!fsubGrocery.Filter
Reports!rptWeek!rsubWeek.Report.FilterOn = True
End Sub
I had a variable for the Report form but read that doesn't work. (it doesn't) The error I get is #438 object doesn't support this property.
Any suggestions
Last edited: