Tekime
Registered User.
- Local time
- Today, 18:48
- Joined
- Jun 26, 2003
- Messages
- 72
I'm trying to set a report's filter property to the filter used by the parent report. Is this possible? I would ideally like to say:
Me.subReportName.Report.Filter = Me.Filter
Or somethign along those lines. I'm setting the filter property of the parent report from a form; the user selects a start and end date for reports, and the parent report is opened when the user clicks a command button:
strClause = "[cb_dateReceipt] >= #" & rptDateStart & "# AND " & _
"[cb_dateReceipt] <= #" & rptDateEnd & "#"
DoCmd.OpenReport stDocName, acPreview, "qry_RptCbByMap", strClause
But every time I try to run the report I get "Run-time error 2455: You entered an expression that has an invalid reference to the property Form/Report"
I'm going crazy trying to find a good way to do this... if you need more info I can describe in a little more detail what I'm trying to accomplish; but if there is a way to set the sub-report filter like this it would solve all my problems
Edit: I should add that I've read about issues with filtering subreports in Access, but I can't find any detailed information on the subject, and I'm not sure this applies to my situation...
Me.subReportName.Report.Filter = Me.Filter
Or somethign along those lines. I'm setting the filter property of the parent report from a form; the user selects a start and end date for reports, and the parent report is opened when the user clicks a command button:
strClause = "[cb_dateReceipt] >= #" & rptDateStart & "# AND " & _
"[cb_dateReceipt] <= #" & rptDateEnd & "#"
DoCmd.OpenReport stDocName, acPreview, "qry_RptCbByMap", strClause
But every time I try to run the report I get "Run-time error 2455: You entered an expression that has an invalid reference to the property Form/Report"
I'm going crazy trying to find a good way to do this... if you need more info I can describe in a little more detail what I'm trying to accomplish; but if there is a way to set the sub-report filter like this it would solve all my problems
Edit: I should add that I've read about issues with filtering subreports in Access, but I can't find any detailed information on the subject, and I'm not sure this applies to my situation...
Last edited: