Macro for backing up Access 2007 database

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

Antonette

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
 

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