<% noads=1 %> <%dim crumb crumb="Compact Repair Method" crumb1="Compact and Repair VBA Code" %> VBA CompactRepair
Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Forums  Blockchain Tech  Contact  Privacy  Links
Application Object Examples
<%response.write crumb1 %>

Visual Basic Application Objects

Home > Access Tutorials > VBA Application Object Methods<%response.write " > " & crumb%>
 
<% dim Gnum,Ynum Gnum="4458683265" Ynum="7682" dim Page_Type Page_Type="Prog" %>





Access Error
AddToFavorites
BuildCriteria
CloseCurrentDatabase
CodeDB
CompactRepair
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

<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>