Hi,
I have a Report which can be driven by either of two Queries (each has slightly different criteria).
On a form I have a ComboBox and a CommandButton.
I wish to set the RecordSource for the Report before opening it.
It will be one of the two Queries mentioned and will be determined by the value selected in the ComboBox.
The Click event for the CommandButton opens the Report by using the following method...
DoCmd.OpenReport "ReportName", acPreview
Please can somebody tell me how I set the RecordSource to the necessary Query before opening the Report?
Thank you.
I have a Report which can be driven by either of two Queries (each has slightly different criteria).
On a form I have a ComboBox and a CommandButton.
I wish to set the RecordSource for the Report before opening it.
It will be one of the two Queries mentioned and will be determined by the value selected in the ComboBox.
The Click event for the CommandButton opens the Report by using the following method...
DoCmd.OpenReport "ReportName", acPreview
Please can somebody tell me how I set the RecordSource to the necessary Query before opening the Report?
Thank you.