N
NevilleT
I have a report containing 13 subreports. Which subreports print is
determined by a form with 13 checkboxes. Tick the box, and the subreport's
visible property is set to true. The visible property is set by the reports
open event and works fine.
When I run the report, and try to print to Word I get an error message that
there are too many databases open. To overcome this I thought I would change
the recordset property of the subreports not required to blank so they would
not open a new query. If it is true the recordsource of the subreport is
changed to a query name.
If Forms![frmProjPlanRptSelector]![chkProjDetails] = True Then
Me!rptPPProjectSub.Report.RecordSource = "qryPPProjectSubreport"
Me![rptPPProjectSub].Visible = True
Else
Me![rptPPProjectSub].Report.RecordSource = ""
Me![rptPPProjectSub].Visible = False
End If
When I run it, the second line causes the following error. "Error 2455 You
entered an expression that has an invalid reference to the property
form/report"
What am I missing?
determined by a form with 13 checkboxes. Tick the box, and the subreport's
visible property is set to true. The visible property is set by the reports
open event and works fine.
When I run the report, and try to print to Word I get an error message that
there are too many databases open. To overcome this I thought I would change
the recordset property of the subreports not required to blank so they would
not open a new query. If it is true the recordsource of the subreport is
changed to a query name.
If Forms![frmProjPlanRptSelector]![chkProjDetails] = True Then
Me!rptPPProjectSub.Report.RecordSource = "qryPPProjectSubreport"
Me![rptPPProjectSub].Visible = True
Else
Me![rptPPProjectSub].Report.RecordSource = ""
Me![rptPPProjectSub].Visible = False
End If
When I run it, the second line causes the following error. "Error 2455 You
entered an expression that has an invalid reference to the property
form/report"
What am I missing?