If you have Access 2000 or later, you don't need a macro for that, it's a
built-in feature! All you need to do is go Tools > Options, select tab
General and tick Compact On Close.
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.