I know how to open and pass a report a parameter from VBA using OpenReport. But how does the report accept this parameter? The parameter will be a table name. This is probably so easy, but I can't find the answer. Thanks.
If you're saying you want to change which table the report is based on, one way would be to pass the table name in OpenArgs and then use that in the open event of the report to set the source. I think only versions 2002 and above supported OpenArgs for reports.
It did end up being OpenArgs. I could find a lot of literature on how to DoCmd.OpenReport with OpenArgs, but not how the report received them. It's "Me.RecordSource = Me.OpenArgs" in the Report_Open routine. This took longer than it should have to find out!
Thanks.