Run code on application close

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.
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top