By using the
Shell function, you can start an MS-DOS batch file that, in turn, calls MSBackup.exe.
NOTE: MSBackup.exe is available only on the Microsoft Windows 95, the Microsoft Windows 98, and the Microsoft Windows Millennium operating systems. You may have to install Microsoft Backup from your CD if MSBackup.exe is not located in your \Program Files\Accessories\Backup folder.
To start Microsoft Backup from Access, follow these steps:
- Click Start, point to Programs, point to Accessories, and then click Notepad.
- Type or paste the following code in the Notepad document:
CD \
CD \"Program Files"
CD \"Program Files\Accessories\Backup"
MSbackup.exe
- Save the text file in the root directory of drive C with the name LaunchMSBackup.bat.
- Create a command button on a form, and then create the following code for the Click event of the command button:
Dim x
x = Shell("C:\LaunchMSBackup.bat")
- Click the command button to run the .bat file, and then close the MS-DOS window that is used by the Shell command.