hi - trying to change the record source based on a form control with the
following code, which is not working (doesn't like the if statement) what am
i doing wrong? thanks so much.
Private Sub Report_Open(Cancel As Integer)
If Forms!Query!txtFundNode Is Null Then
Report.RecordSource = "BuildLgr_Node5"
Else
Report.RecordSource = "BuildLgr_Node5_Fund"
End If
End Sub
fredg said:
Hi Folks - Report A's recordsource is Query A. How can I use a different
query for Report A at runtime? Thanks.
Michael
You can simply change the report's record source in the report's Open
event.
What determines which query to use?
If [SomeCriteria] = something Then
Me.RecordSource = "QueryA"
Else
Me.Recordsource = "QueryB"
End If