L
Larry Hodges
Running Access 10
I have a form to launch my report. The form creates a temp table for the
report to use. When the report closes, I want to delete the temp table.
DoCmd.DeleteObject acTable, "MyTempTable"
The above works if the report is already closed. But if launching in the
Close event for the report, it doesn't. I assume that's because the table
is in use.
I've tried creating a separate hidden form to launch from the report Close
event, assuming the dataset would be closed. I've got the code in the
Activate event in the form, but it still errors out because the table is in
use.
Is there a way to close the table in the report itself, then delete the temp
table from there? If not, how do I close the table before the form I've
created tries to delete it?
Thanks in advance...
I have a form to launch my report. The form creates a temp table for the
report to use. When the report closes, I want to delete the temp table.
DoCmd.DeleteObject acTable, "MyTempTable"
The above works if the report is already closed. But if launching in the
Close event for the report, it doesn't. I assume that's because the table
is in use.
I've tried creating a separate hidden form to launch from the report Close
event, assuming the dataset would be closed. I've got the code in the
Activate event in the form, but it still errors out because the table is in
use.
Is there a way to close the table in the report itself, then delete the temp
table from there? If not, how do I close the table before the form I've
created tries to delete it?
Thanks in advance...