OhioSteve, you can't compact and repair the database via vba when the current database is open i'm afraid.
In Access 2000 and later, there is an option to "compact on close" (in the Tools menu). This may be of use to you, otherwise your only other option would be to initiate a second database, close your first and then have the second compact and repair the first!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.