Restart Exclusive and then Backup Database?

U

Undrline

So, DoCmd.RunCommand acCmdBackup doesn't work (not even sure if acCmdBackup
is the right one to use) - it gives an error that command isn't available
now. But, I want the user, to be able to click a button and be able to save
a copy of the .mde with all the data that they've currently entered.
There're going to be multiple copies of the database spread around, each with
their own dataset, so I can't hardcode the path.
 
U

Undrline

I can back up the database manually when I can't use this. Hmmm. So maybe I
do have the constant wrong? I'm going to Tools>Database Utilities>Back Up
Database . . .
 
U

Undrline

I answered my own question:

'Application.RunCommand acCmdBackup
' The above code, though it should work, does not. This is a workaround.
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database Utilities"). _
Controls("Back Up Database..."). _
accDoDefaultAction
 
Top