Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Custom Database Design Consultants
 
Access Programming Examples
 
Access Example Downloads
Access Application Object Examples

Application Object Method Examples
Methods for Controlling Access Objects

Access Tutorials>Application Object Methods> Compact Repair Method



                                   
AccessError Method
AddToFavorites
BuildCriteria Method
CloseCurrentDatabase
CodeDB
CompactRepair Method
ConvertAccessProject


Access CompactRepair Method Example

CompactRepair Method - Compacts/repairs the specified database (.mdb) or Microsoft Access project (.adp) file.
Returns a Boolean - true if the process was successful.

CompactRepair Syntax:

Expression.CompactRepair (SourceFile, DestinationFile, LogFile)

Where:

Expression is a variable of type 'application' or the word application.

Sourcefile is full path and filename of the database to be compacted.

DestinationFile is the full path and filename of the resulting database file.

Example:

Application.CompactRepair("c:\mydbs\database.mdb","c:/mydbs/database_backup.mdb",true)

The compact repair command is of marginal usefulness because you can't compact/repair the currently opened database.


Contact Information

Custom Software Development
Microsoft Access 2003 2000 2002(XP) 97 All Windows Versions