Macro for backing up Access 2007 database

  • Thread starter Thread starter lwbadgr
  • Start date Start date
L

lwbadgr

I'm trying to make a macro for backing up my database by using the exit
button on my switchboard. I'd like to have my exit button run a macro which
before exiting the database would ask the operator if they'd like to back up
the database. If yes, back up, if no, exit the program. How can I do this?
 
Iwbadger;

You will first have to use the Message Box function on you exit
button. There are plenty of excellent examples on the Web.

Then you enter the code if vbYes = True then
Run Macro Backup
End If

To create the Backup Macro, select the Macro option in your
database.
Click on New.
Scroll Down the Action Column and you should fine a CopyObject Function.

I am pretty sure this will work even though I do not remember trying it.

Good Luck

Toni
 
Back
Top