Hi Colin. Thanks for your interest.Its probably due to the recent Access bug that had supposedly been fixed.
Which version of Access are you using and if its 365 have you done the latest update to version 2203?
Just this one, I'm pleased to say.Is it just that one database? If so, try decompiling First.
If its all databases, then check for recent updates which should fix the bug
I've tried decompiling and then compiling it but I still get the error when trying to Compact and Repair.Is it just that one database? If so, try decompiling First.
If its all databases, then check for recent updates which should fix the bug
My apologies. This does seem to be happening with every db.Try each of these in turn
1. Double check that there aren't two copies of the DB open
2. Open with the shift bypass so no code is running, then compact,
3. Open exclusive, then compact.
4. Compact it from another database
5. Compact it from File Explorer (see utility at Daniel Pineault's site) or using a command line switch
6. Import all objects into a new blank database then compact.
Don't forget to check for updates to 2019
yesBob, are you using McAfee by any chance?
Cannot Compact And Repair Access Database – File Already In Use
Here's what to do when you try to compact and repair your databases and Microsoft Access reports "Could not use [filename] file already in use".www.devhut.net
Read that link then.
Thanks for your interest.Read that link then.![]()
Many thanks to everybody for their interest, time, comments and advice.Most AV have a whitelist that you build to say you trust at that time?
I just use the free AVG, but a quick Google shows https://www.google.com/search?q=mca...3j0i22i30l6.9433j0j7&sourceid=chrome&ie=UTF-8
As Daniel indicates, just stop McAfee from scanning for a short while, while you try and compact.
Then if successful, set an exception.