How can I backup my database using an Event procedure?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to backup my database by clicking a command button. I think a
DoMenuItem command might work, but I don't know the specific code (ie.
"DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70").

Any suggestions?
 
Curious said:
I'm trying to backup my database by clicking a command button. I think a
DoMenuItem command might work, but I don't know the specific code (ie.
"DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70").


You can not reliably copy an open database file because you
can not guarantee that it is in a quiescent state. Since
the database that contains the code you are asking for is
running, the file must obviously be open.

Don't forget that a backup should be verified before it is
put on the shelf. Without at least a quick check that the
backup file is comple, you won't know if it can be restore
until you are desperate for it to work.

Putting all that together implies pretty strongly that a
backup is an offline operation, not something that can be
done by a simple button click in your application.
 
Back
Top