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.

Signature
Rick B
> 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
[quoted text clipped - 6 lines]
> Thanks.
> -Andy
Darhl Thomason - 31 Jan 2006 00:03 GMT
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
> 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
[quoted text clipped - 12 lines]
>> Thanks.
>> -Andy
Andy G - 31 Jan 2006 19:22 GMT
Where do you disable the application X. The X to close Access down?
Thanks.
> Or you can always disable the X so they can't use it to close the db,
> forcing them to use the logout button.
[quoted text clipped - 17 lines]
>>> Thanks.
>>> -Andy