Deleting a temp table upon closing a report. 
Author Message
 Deleting a temp table upon closing a report.

Is there a way to delete a temporary table (with a variable name inputed by
user) upon closing the report that is based on this table.
I've tried a function attached to the ON CLOSE and ON DEACTIVATE properties
of the report, but I always get a message that the table is still in use.
Although the function closes the report and refreshes the TABLES CONTAINER
and closes the temporary table.
Any suggestions???

Thanks in advance.



Tue, 07 Mar 2000 03:00:00 GMT  
 Deleting a temp table upon closing a report.


Quote:
>Is there a way to delete a temporary table (with a variable name inputed by
>user) upon closing the report that is based on this table.
>I've tried a function attached to the ON CLOSE and ON DEACTIVATE properties
>of the report, but I always get a message that the table is still in use.
>Although the function closes the report and refreshes the TABLES CONTAINER
>and closes the temporary table.
>Any suggestions???

Definitely sounds like a timing issue.  You're table is still open by
the report at the time the Report is closed.  There are probably
several ways to handle this...

Create a Form that Opens your report.  When the Report gets opened,
Hide the Form (Me.Visible = False), in the On Close event of the
Report, trigger a TimerEvent in the (now hidden) form that unhides the
Form and deletes the temp table.

Steve



Wed, 08 Mar 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. My app makes a temp file in win/temp dir upon execution

2. Temp Files Not Deleting after closing Word 2002

3. Problems Closing/Deleting a temp Database

4. Passing Data From A Form To A Different Table Upon Close

5. Delete Temp. Table

6. Report againt temp table

7. Delete a report when closing from PrintPreview

8. Access does not close upon opening new instance of Access

9. Intercepting Save upon close event

10. delete user profiles upon logout

11. form close upon MDI form

12. Preventing automatic update upon program close

 

 
Powered by phpBB® Forum Software