S
S Jackson
I have a dialog form that users use to select to view and/or print different
reports.
One of the reports contains an unbound subreport. I am attempting to assign
the unbound object to a specific subreport using the following code behind
the "On Open" event of the Report:
Dim strReport As String
Select Case Nz(Me.Program, "")
Case "CNA", "NFA", "CMA"
strReport = "rsubCaseInfoSheet2"
Case Else
strReport = "rsubCaseInfoSheet"
End Select
Me.rsubReport.SourceObject = strReport
I get the message that I have entered an expression that has no value.
When I place the code behind the On Format of the Report Detail section I
get the error that reads: "You can't set the Source Object property after
printing has started."
I even tried placing this code behind the Repirt Header section, but get the
same message as above.
Here is a look at the query behind the report (if it helps at all):
SELECT tblCaseInfo.*, tblStatus.StatusRptNotes, tblStatus.TickleDate,
tblStatus.ClosedDate, tblHearings.HrgStart, tblRepresentatives.*,
tblAction.*
FROM (((tblRepresentatives RIGHT JOIN tblCaseInfo ON tblRepresentatives.ID =
tblCaseInfo.RepID) LEFT JOIN tblHearings ON tblCaseInfo.CaseId =
tblHearings.CaseId) LEFT JOIN tblStatus ON tblCaseInfo.CaseId =
tblStatus.CaseId) INNER JOIN tblAction ON tblCaseInfo.CaseId =
tblAction.CaseID
WHERE (((tblStatus.ClosedDate) Is Null));
Anyone have any thoughts?
reports.
One of the reports contains an unbound subreport. I am attempting to assign
the unbound object to a specific subreport using the following code behind
the "On Open" event of the Report:
Dim strReport As String
Select Case Nz(Me.Program, "")
Case "CNA", "NFA", "CMA"
strReport = "rsubCaseInfoSheet2"
Case Else
strReport = "rsubCaseInfoSheet"
End Select
Me.rsubReport.SourceObject = strReport
I get the message that I have entered an expression that has no value.
When I place the code behind the On Format of the Report Detail section I
get the error that reads: "You can't set the Source Object property after
printing has started."
I even tried placing this code behind the Repirt Header section, but get the
same message as above.
Here is a look at the query behind the report (if it helps at all):
SELECT tblCaseInfo.*, tblStatus.StatusRptNotes, tblStatus.TickleDate,
tblStatus.ClosedDate, tblHearings.HrgStart, tblRepresentatives.*,
tblAction.*
FROM (((tblRepresentatives RIGHT JOIN tblCaseInfo ON tblRepresentatives.ID =
tblCaseInfo.RepID) LEFT JOIN tblHearings ON tblCaseInfo.CaseId =
tblHearings.CaseId) LEFT JOIN tblStatus ON tblCaseInfo.CaseId =
tblStatus.CaseId) INNER JOIN tblAction ON tblCaseInfo.CaseId =
tblAction.CaseID
WHERE (((tblStatus.ClosedDate) Is Null));
Anyone have any thoughts?