Access Database settings

  • Thread starter Thread starter Raja
  • Start date Start date
R

Raja

How do you set up a database to compact & repair automatically when closing?

Tools > Options... and choosing Compact from the general tab will only
compact but will it repair as well?

Many thanks
 
Depends on your version. I don't remember when it change (97 I think), but
originally Compact and Repair were two seperate operations. They are now
one. Compact and Repair will be done when you close the database.
 
Raja said:
How do you set up a database to compact & repair automatically when
closing?

In general, it's a bad idea to do so. If you have a multiuser application it
should be split into a frontend with the forms, queries, reports etc., and a
backend with the tables; the front end usually won't bloat and if it does
can simply be replaced with a clean copy, and the backend should only be
compacted when nobody else is using the database anyway.
Tools > Options... and choosing Compact from the general tab will only
compact but will it repair as well?

Yes, it's all one operation.

I'd suggest compacting the backend manually or using Windows Scheduler with
the /compact command line option to launch Access and compact the database,
if it's critical. I turn Compact on Close OFF.
 
And if you are running Access 2007, make sure that you install the hotfix
that prevents it from destroying your database if you use Compact and Repair
on Close. Even then, test it on a backup copy of your database.

LDN
 
Back
Top