Application Exit Event

  • Thread starter Thread starter Guest
  • Start date Start date
If I remember correctly, forms are closed in reverse order of opening
them - last opened, first closed.
Therefore, when your database opens, load an invisible form before you
do anything else. When the database closes, this form will be the last
to get closed. Use the form's Close event to run your code. I would
probably include some code to ensure all other forms are in fact closed
before running the actual code.

Regards,
Andreas
 
Charles,

The usual trick in Access is to use the On Close event of a switchboard
or other form that stays open the whole time, if one exists, otherwise
employ a dummy, hidden form just for the purpose. Now, whichever way the
user closes the app (normally, that is, not by killing it through the
task manager or pulling the plug!) the form is forced to close, and so
the code is forced to run.

HTH,
Nikos
 
Back
Top