I see that the BE database keep bigger in size. My question is if
we setup the option to be " Compact on Close" on each Front End of
the users, does it work to compact the backend?. How can it be
while the other users is closing, while the others are still
using, how will it disturb the current BE when compacting??.
Compact on close is both useless and dangerous:
1. if your app is split (as it should be), COMPACT ON CLOSE will
compact only the front end, and front ends just don't need to be
compacted, since no data is stored in them and they don't grow
beyond a certain point after they've been in use.
2. some databases that can be opened but are in a suspect state
(i.e., there is corruption present but it's not preventing the
contents of the database from being used) when compacted will lose
data that was previously accessible. In other words, a compact that
you can't cancel (as with COMPACT ON CLOSE) could cause you to lose
data that would otherwise be recoverable absent a compact.
There is no circumstance under which COMPACT ON CLOSE should be
turned on. Indeed, Microsoft should completely remove it from Access
because when it is not a waste of time, it is downright dangerous to
your data.
On the issue of compacting your back end, you need to do it via some
other method. Possibilities include:
1. have a command button somewhere in your front end that will
compact the back end for you. This requires that no other users be
connected to the database at the time of the compact, and that you
have closed all data-bound forms in your front end.
2. have a process that runs on a schedule on your server that
compacts the back end on a regular basis. This is easily enough
programmed with VBScript, but I'd recommend also adding in some
backup, so that if your compact causes problems, you can restore the
previous version.