trypots.nethome
the High Seas of Information Technology

MC_CompactDB is a set of VBA procedures for compacting Access databases:

  • compacts databases listed by file locations
  • creates and maintains backups while compacting databases
  • can be used to schedule backups as a dedicated task with or without compacting
  • runs easily after hours via windows scheduler
  • writes activities to a log file for review
  • customizable according to user preferences
  • works from two complementary class files:
    • MC_DB - a vba class representing a database to be compacted.
    • MC_CompactDB - the main class that compacts and/or backs up the database.

... executes easily with a few lines of code:

Public Function MyCompactMyDatabases() As Byte
Dim obj As MC_CompactDB
    
Set obj = New MC_CompactDB
    
obj.addDB "C:\myTemp\TestDB.mdb"
    obj.DoCompacts
    
Set obj = Nothing
End Function

More Information:
last modified: 28-Jan-2015
Copyright © 2015