"Exit Access" Code

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

Maurice

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

Arvin Meyer [MVP]

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.
 

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