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.