How to Compact Databases at a Scheduled Time (158937)
The information in this article applies to:
- Microsoft Access 97
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
This article was previously published under Q158937 Moderate: Requires basic macro, coding, and interoperability skills.
SUMMARY
This article describes two methods that you can use to start to compact one or more databases automatically at a scheduled time. In the first method, you create a small database with a table, a form, and a macro. The table stores the names of
the databases you want to compact. The form contains a procedure in the
Timer event that starts to compact the databases whose names are in the
table. The macro opens the form every time you open the database.
In the second method, you can use a scheduling utility, such as the NT Schedule Service, to open an Access database by using the /compact command line switch.
This article assumes that you are familiar with Visual Basic for
Applications and with creating Access applications by using the
programming tools that are provided with Access. For more information
about Visual Basic for Applications, see your version of the
"Building Applications with Microsoft Access" manual.
NOTE: Visual Basic for Applications is called Microsoft Access Basic in Access version 2.0. For more information about Access Basic, see the "Building Applications" manual.
REFERENCES
For more information about the Timer event or the TimerInterval property,
search the Help Index for Timer event or TimerInterval property. For additional information about starting Access with the NT Schedule Service, click the article number below
to view the article in the Microsoft Knowledge Base:
231478 ACC97: How to Start Access by Using the Windows NT Schedule Service
For additional information about starting Access with command line switches, click the article number below
to view the article in the Microsoft Knowledge Base:
105128 ACC: How to Use Command-Line Switches in Microsoft Access
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbhowto kbProgramming KB158937 |
---|
|