Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch needed to compact/repair BE?

Status
Not open for further replies.

Isadore

Technical User
Feb 3, 2002
2,167
US
I have the typical Front End <---> Back End set up. I am concerned that the Back End is not getting "Compacted and Repaired" on a daily basis during use, that is, when the user opens up their Front End and closes it, the tables of course are closed as well but is a compaction and repair done at the same time? My gut feeling is that it is not. Do I need to impliment a DOS Batch for this? Thanks for your time.
 
Found a FAQ at the module forum that covers this:

faq705-4998
 
The above FAQ was rather involved, tracking the first user of the day, etc. The following VB attached to a button worked just fine:

Code:
  Me.Application.CloseCurrentDatabase
  DBEngine.RepairDatabase "C:\AWW\awwTables\awwTables.mdb"
  DBEngine.CompactDatabase "C:\AWW\awwTables\awwTables.mdb", "C:\AWW\awwTables\awwTables.mdb"
 
Also consider using scheduling tools such as Windows Task Scheduler or the Handy Access Launcher, HAL ( to do this for you.

Both these tools allow you to schedule Access to open your database with the /compact and/or /repair command line switches, to perform your db maintenance in an automated fashion.

Windows Task SCheduler is part of your OS; the more flexible HAL is freeware.

Hope this is of interest.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top