"Exit Access" Code

  • Thread starter Thread starter kenrav
  • Start date Start date
K

kenrav

Is there a way I can run some final code (re: backup) after the user clicks
the "Exit Access" button (located under the Office button)? Thanks.
 
Hmm, i tend to do this in the form close event of the mainform of my apps.
You never know what a user is up to so maybe 'he or she is exiting access a
couple of times for no good reason. In your case that would mean a couple of
unnecessary backups. When doing this from your main form of your app you have
much more control over the various processes.

just my 2 cts...
 
Create a form that opens in hidden (not Visible) mode. That form has other
uses as well. It can store session wide variables, etc. When Access closes,
that form will close also, and you can use the Close event to eun a backup
routine. Keep in mind that's really only good for a workstation database. A
split database running the data back-end on the server, may have other users
still in it, you then take a chance of either throwing an error, or worse,
corrupting the backup (or even the working database). In that case, the
regular server backup is better equipped to handle the backups of your
database.
 
Back
Top