files / back-up database

  • Thread starter Thread starter mark kubicki
  • Start date Start date
M

mark kubicki

what would be the code to assign the commmand:
"file / back-up data base..."
to a command button on a user form (assumng the usual default values that
are part of the standard toolbar command?)

thanks in advance,
mark
 
Hi Mark,
There is no way to invoke the File/Back Up Database from code since the code
is stored in the database that is being backed up. You could use the
DoCmd.CopyDatabaseFile method, but all windows except the main database
window must be closed first. I reccommend using the CopyFileA API call (See
http://www.pcreview.co.uk/forums/thread-1068342.php for an example) or the
Scripting.FileSystemObject method (See
http://www.accessvba.com/forum/archive/index.php/t-10745.html for an example).

I hope this helps.
 

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