Q: How do I force a macro to run when user closes Access database from the close button (the X at the top right) of the Access window.
My application "relies" on the user to exit the database from a button on my main window. The macro attached to this button restores some Accees settings as well as deletes some temporary tables which are used by the system to process data. These temporary tables are very large, up to 50% of the size of the database.
If the users justs closes the Access window this macro does not run. Is there a way to identify this action by the user so that I can get this macro or any other VBA procedure to run when this happens ? or disable the X button on the Access window ?
Thanks in advance.
Cosmark
My application "relies" on the user to exit the database from a button on my main window. The macro attached to this button restores some Accees settings as well as deletes some temporary tables which are used by the system to process data. These temporary tables are very large, up to 50% of the size of the database.
If the users justs closes the Access window this macro does not run. Is there a way to identify this action by the user so that I can get this macro or any other VBA procedure to run when this happens ? or disable the X button on the Access window ?
Thanks in advance.
Cosmark