Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 302502 - Last Review: October 7, 2004 - Revision: 2.0
How to start Microsoft backup from Access 2000 and Access 2002
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).
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.
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.
APPLIES TO
- Microsoft Access 2002 Standard Edition, when used with:
- Microsoft Windows 98 Standard Edition
- Microsoft Windows 98 Second Edition
- Microsoft Windows Millennium Edition
- Microsoft Access 2000 Standard Edition, when used with:
- Microsoft Windows 98 Standard Edition
- Microsoft Windows 98 Second Edition
- Microsoft Windows Millennium Edition
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate