I am trying to use a command button on a form to enable a user to bring up the backup utility you get from the menubar under the “File” item. Thus on the event click in VBA code:
Application.RunCommand AccmdBackup
(or DoCmd.RunCommand 513, 513 being the number for the backup item)
I get “Run-time error 2046: The command or action “Backup” isn’t available now.”
I’ve looked all over and can’t find a solution to this problem. If you know of one, please pass it on to me.
I’ve done a workaround using the DOS copy command in a one-line batch file “copy %1 %2” and using Shell(file.bat sourcefile destinationfile), but I’m afraid in the future there will be no DOS commands available in Windows and would like to get the Access command to work right. (The sourcefile and destinationfile are selected by the user by way if an inputbox).
Any help appreciated,
Jim Gansle