Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to start Microsoft backup from Access 2000 and Access 2002


View products that this article applies to.

This article was previously published under Q302502
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

↑ Back to the top


Summary

In Access and other Microsoft Office applications, you can use the Shell function 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 function does not support. Microsoft Backup is one of these applications.

↑ Back to the top


More information

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:
  1. Click Start, point to Programs, point to Accessories, and then click Notepad.
  2. Type or paste the following code in the Notepad document:
    CD \ 
    CD \"Program Files"
    CD \"Program Files\Accessories\Backup"
    MSbackup.exe
    					
  3. Save the text file in the root directory of drive C with the name LaunchMSBackup.bat.
  4. 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")
    					
  5. Click the command button to run the .bat file, and then close the MS-DOS window that is used by the Shell command.

↑ Back to the top


Keywords: KB302502, kbvba, kbhowto

↑ Back to the top

Article Info
Article ID : 302502
Revision : 2
Created on : 10/7/2004
Published on : 10/7/2004
Exists online : False
Views : 337