I have developed a generic report that I wish to run using different queries as the RecordSource.
I need to be able to pass parameters from an OnClick event from a form to a report to print or generate a preview based on the parameters passed. I plan to hard code the query name in the form button's OnClick event. One OnClick event may generate multiple reports.
One of these parameters is the query name. Another would be the contents of a TextBox (ie to change the title of the report to match the query results.
I've tried a few things but they don't work.
I would appreciate any suggestions on the best ways to make this work.
Thanks in advance.
John
I need to be able to pass parameters from an OnClick event from a form to a report to print or generate a preview based on the parameters passed. I plan to hard code the query name in the form button's OnClick event. One OnClick event may generate multiple reports.
One of these parameters is the query name. Another would be the contents of a TextBox (ie to change the title of the report to match the query results.
I've tried a few things but they don't work.
I would appreciate any suggestions on the best ways to make this work.
Thanks in advance.
John