Run code on application close

  • Thread starter Thread starter DZ
  • Start date Start date
D

DZ

How can I run code when my Access application close.

I don't think there is an AutoClose macro in access.

Thanks for any help with this.
 
DZ said:
How can I run code when my Access application close.

I don't think there is an AutoClose macro in access.

Thanks for any help with this.


At startup, open a hidden form. You can use the Autoexec macro to do this,
or open it from your startup form, or it could even *be* your startup.
Leave this form open, but hidden, all the time the application is open. Use
the Unload event of this form to run your code. The form will be unloaded
automatically when the application closes, so your code will run then.
 
Back
Top