I have a report application that allows the user to open various forms, select criteria, and run a report. I need to print a selection of all of the reports for each division once a month, so I set up a main form called frmSet that opens each report form in sequence, sets the criteria that the report needs from that report form to open, and then opens the report directly in the code to the printer, and closes the form.
This works fine for all the reports that are based directly on queries, but I have a report that is based on a temporary table created as part of the on click for the button to open the report on its corresponding form. All the code is in that form (frmProv). It builds the custom SQL and creates a table, that is then queried by the report.
What I want to know is if there is any way to run that code in the frmProv form (essentially "click" that button) from the frmSet form. I want to be able to open the frmProv, set my criteria, run the code to create the temporary table, print the report, and close the form (frmProv) from the form frmSet.
Anyone know if this can be done?
Thanks.
Kris
This works fine for all the reports that are based directly on queries, but I have a report that is based on a temporary table created as part of the on click for the button to open the report on its corresponding form. All the code is in that form (frmProv). It builds the custom SQL and creates a table, that is then queried by the report.
What I want to know is if there is any way to run that code in the frmProv form (essentially "click" that button) from the frmSet form. I want to be able to open the frmProv, set my criteria, run the code to create the temporary table, print the report, and close the form (frmProv) from the form frmSet.
Anyone know if this can be done?
Thanks.
Kris