Use vba from a form to make a backup of the current database?

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

Guest

Hey all, I have a very critical button that runs some sensitive code
(sensitive on the data anyways), what I want to do, is when the button is
pushed, make a backup of that database (exact copy, pre-button pushing), into
a backup folder...

Is there anyway to do this?
 
There is no reliable way I know of to back up an Access database that is in
use.

You can loop through all the tables to export the data, but it may be an
inconsistent copy (if changes occured during the copy process), or perhaps
some tables may have be locked (so the copy would lack those tables.)

If you accept those risks and want to do it anyway, see:
http://allenbrowne.com/Unlinked/Backup.txt
 
havocdragon said:
Hey all, I have a very critical button that runs some sensitive code
(sensitive on the data anyways), what I want to do, is when the button is
pushed, make a backup of that database (exact copy, pre-button pushing), into
a backup folder...

Is there anyway to do this?


try:
DoCmd.CopyDatabaseFile(DatabaseFileName, OverwriteExistingFile,
DisconnectAllUsers)

its in Access 2002 , I dont know about older
 

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

Back
Top