I have one report where I want to be able to choose different query sources based upon a drop down list on a form.
I have 4 seperate queries and they work when I run them seperately but when I run the report, the data displayed doesn't totally match the data of my query.
This is probably something simple i am overlooking...
Here is my code:
=====
Select Case Me!psteam
Case 1 ' ALL
Reports("Report1").RecordSource = "ALL qry"
Case 2 ' CELLA
Reports("Report1").RecordSource = "CELLA qry"
Case 3 ' CELLB
Reports("Report1").RecordSource = "CELLB qry"
Case 4 ' CELLC
Reports("Report1").RecordSource = "CELLC qry"
End Select
DoCmd.OpenReport "Report1", PrintMode
=======
Is my syntax correct?
Thanks in advance
I have 4 seperate queries and they work when I run them seperately but when I run the report, the data displayed doesn't totally match the data of my query.
This is probably something simple i am overlooking...
Here is my code:
=====
Select Case Me!psteam
Case 1 ' ALL
Reports("Report1").RecordSource = "ALL qry"
Case 2 ' CELLA
Reports("Report1").RecordSource = "CELLA qry"
Case 3 ' CELLB
Reports("Report1").RecordSource = "CELLB qry"
Case 4 ' CELLC
Reports("Report1").RecordSource = "CELLC qry"
End Select
DoCmd.OpenReport "Report1", PrintMode
=======
Is my syntax correct?
Thanks in advance