Hi Andrew,
Thank you for kind clarification and the detailed testing steps! My apologize not to specify
the detailed steps to implement that method on how to compact the BE databae.
I agree with you that if the back-end database is not manually opened, it will not be
compacted with the "Compact On Close" option unless we issue VBA code to compact the
BE database directly. In this scenario, I assumed that you and Reidar will fire a user
function/application which first checks all the connections closed and then compact the BE
database.
We don’t provide application coding, so I just described the way to realize this. Sorry for any
misunderstanding and convenience brought to you!
For detailed steps:
1. Set the "Compact On Close" on both FE and BE (set in BE for the scenario that you can
launch the instance, open the database and close it for compacting after all the users exit
the database.)
2. Use a user fired function/application which will first checks if there are no users on the BE
database:
198755 HOW TO: Check Who Logged into Database with Jet UserRoster in Access 2000
http://support.microsoft.com/?id=198755
3. On the next place, compact the database directly using ADO/OLE DB method as below:
230501 HOWTO: Compact Microsoft Access Database Through ADO
http://support.microsoft.com/?id=230501
230496 HOWTO: Compacting Microsoft Access Database Through OLE DB
http://support.microsoft.com/?id=230496
Another recommendation is to compact the database at a scheduled time instead of
everytime when the last user exits the database. This scheduled method is easier to
implement as long as you can make sure all the users exit the database at that time or
check the user on the database first.
158937 How to Compact Databases at a Scheduled Time
http://support.microsoft.com/?id=158937
Reidar and Andrew, please feel free to let me know if there is anything unclear about the
above steps. Thank you for posting in the community!
Best regards,
Billy Yao
Microsoft Online Support