Access Database settings

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
 
K

Klatuu

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.
 
J

John W. Vinson/MVP

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.
 
R

roccogrand

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top