Forum Discussion
lytell
May 06, 2021Copper Contributor
Compact & Repair throws error saying file is in use
When trying to compact and repair any database created on my computer i get an error saying file is already in use. I have tried every possible way to fix this - reinstalled Office 365 tried multiple...
lytell
May 08, 2021Copper Contributor
Nevermind I forgot to include the name of the DB. I think this worked it went from 18,560KB to 10,476KB
isladogs
May 08, 2021MVP
Clearly it did work! I use that approach to compact a BE database from the FE but it can be used to compact any database. The code can also be used to compact the current database to a backup file. Try changing strOldPath to the path of the current database and see if it works for you as well
NOTE: A minor modification will allow it to compact password protected databases as well
NOTE: A minor modification will allow it to compact password protected databases as well
- lytellMay 30, 2021Copper ContributorGood news. I finally found the culprit - It was Bitdefender (free edition) after reading about a similar issue i decided to uninstall Bitdefender and Bam! all is good now.
- isladogsMay 30, 2021MVPGood to hear you have a solution. Thanks for letting us know the cause. It may help someone else in the future