ACC1x: How to Simulate Changing RecordSource Property of ReportID: Q102672
|
Although you cannot actually change the RecordSource property of a report, you can simulate the change by using a OpenReport macro action and calling a different query source from the Filter Name argument.
The Filter Name argument must reference a query that contains the same
number of fields (with the same names) as appear in the existing
report. If the fields do not exist in the query, the report may
display the "#Name?" error message for controls bound to those fields.
To simulate changing the RecordSource property of a report called
MyReport, do the following:
OpenReport
-----------------------
Report Name: MyReport
View: Print Preview
Filter Name: MyNewQuery
Microsoft Access "User's Guide," version 1.0, Chapter 23
Keywords : kbusage
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 24, 1999