On application close need to run code

  • Thread starter Thread starter Andy G
  • Start date Start date
A

Andy G

What is the best way to run code when the application is closed? Is there a
Application_Close somewhere in Access that I have access to? Maybe someone
has a Rube Goldberg 'esk' way of accomplishing this.

The reason I need this is because the user tends to hit the X to close the
application and I have no way to catch that and run the necessary code. I
have a logout button but they don't always use it.

Thanks.
-Andy
 
The most common way is to include the code in a form's "close" event. Then
have this form automatically open with the database (in hidden mode if you
want).

This will fire when the form is closed.
 
Or you can always disable the X so they can't use it to close the db,
forcing them to use the logout button.

d
 

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

Back
Top