ACC97: How to Start MSBackup.exe from Microsoft Access (302881)



The information in this article applies to:

  • Microsoft Access 97, when used with:
    • the operating system: Microsoft Windows 95
    • the operating system: Microsoft Windows 98
    • the operating system: Microsoft Windows 98 Second Edition
    • the operating system: Microsoft Windows Millennium Edition

This article was previously published under Q302881
For a Microsoft Access 2000 version of this article, see 302502.

For a Microsoft Access 2002 version of this article, see 302891.

Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

SUMMARY

In Microsoft Access (and other Microsoft Office applications), you can use the Shell command in Visual Basic for Applications (VBA) code to start another application. Although you can start most applications in this manner, there are some applications that the Shell command does not support. MSBackup.exe is one of these applications.

MORE INFORMATION

By using the Shell command, you can start an MS-DOS batch file that, in turn, calls MSBackup.exe.

NOTE: MSBackup.exe is available only on the Windows 95, Windows 98, and Windows Millennium operating systems. You may have to install Microsoft Backup from your CD if MSBackup.exe is not located on your computer.

To start MSBackup.exe from Access, follow these steps:
  1. Click Start, point to Programs, point to Accessories, and then click Notepad.
  2. Type or paste the following text into Notepad, but substitute your own path and file information:
    CD\ 
    CD \"Program Files"
    CD \"Program Files\Accessories\Backup"
    MSbackup.exe
    					
  3. Save the text file in the root directory of drive C, and name it LaunchMSBackup.bat.
  4. Add a command button to a form
  5. Right-click the command button, and then click Build Event.
  6. In the Choose Builder dialog box, click Code Builder, and then click OK.
  7. Type or paste the following command in the module:
    Shell C:\LaunchMSBackup.bat
    					
  8. Click the command button to run the .bat file, and then close the MD-DOS window that is used by the Shell command.

Modification Type:MinorLast Reviewed:9/27/2004
Keywords:kbhowto KB302881