S
Sherlin
i trying to set report recordsource base on user selection value but
encounter problem setting subreport recordsource.
1.
If str = 1 Then
Me.RecordSource = "Q1"
Me.subreportname.Report.RecordSource = "subQ1"
ElseIf str = 2 Then
Me.RecordSource = "Q2"
Me.subreportname.Report.RecordSource = "subQ2"
But, I getting run-time error '2455'
You entered an expression that has an invalid reference to the property
Form/Report.
Even i try another method, idea from another post in this discussion group
whereby set subreport recordsource in subreport report_open proc with below
code, but
2.
Static ini As Boolean
If Not ini Then
If GstrCntrLoadType = 1 Then
Me.RecordSource = "subQ1"
ElseIf GstrCntrLoadType = 2 Then
Me.RecordSource = "subQ2"
...
End If
ini = True
End If
Getting problem, subQ1 record is not display at all... I confirm subQ1
having data. Seems like the link of main report and subreport have been gone.
Could anyone highligh to me whats wrong with my code or any idea how to set
subreport recordsource?
encounter problem setting subreport recordsource.
1.
If str = 1 Then
Me.RecordSource = "Q1"
Me.subreportname.Report.RecordSource = "subQ1"
ElseIf str = 2 Then
Me.RecordSource = "Q2"
Me.subreportname.Report.RecordSource = "subQ2"
But, I getting run-time error '2455'
You entered an expression that has an invalid reference to the property
Form/Report.
Even i try another method, idea from another post in this discussion group
whereby set subreport recordsource in subreport report_open proc with below
code, but
2.
Static ini As Boolean
If Not ini Then
If GstrCntrLoadType = 1 Then
Me.RecordSource = "subQ1"
ElseIf GstrCntrLoadType = 2 Then
Me.RecordSource = "subQ2"
...
End If
ini = True
End If
Getting problem, subQ1 record is not display at all... I confirm subQ1
having data. Seems like the link of main report and subreport have been gone.
Could anyone highligh to me whats wrong with my code or any idea how to set
subreport recordsource?