Forum Discussion

jadedalan's avatar
jadedalan
Copper Contributor
Nov 19, 2020

Access 2019 Unable to Compact or back up DBs

Hi

Help. I've recently installed a standalone copy of access.  I have some experience of using earlier versions.  Whenever I try to either compact or back-up a db, an error message tells me that my file is in use.  I have eliminated the possibility of old lock files and have ensured the folders I'm using all have full permissions.  I've also tried 'clearing the air' via a blank db as advised elsewhere.  Whether I attempt to initiate this process from'Database Tools compact & Repair' or via 'Home/Info', the results are always 'Could not Use - file nnn already in use'.  I realise that I can set 'Compact on Close' but this is not an answer and is no help at all for Backing up.   Am I doing something obviously wrong?

  • I've seen this when the database was in a SharePoint library. Is that the case here? Even placing the file locally was not enough, I had to copy the file to another PC to unlock it to be able to work with it properly, then copy it back.

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor

    jadedalan 
    Is this a problem with only one accdb, or does it happen with any accdb you open?

    Does any automation code run at startup?

    If not, does this happen if you open the accdb and immediately try to run compact & repair before doing ANYTHING else?

    Are you trying to compact & repair an accdb in a folder on your local computer, or in a network share?

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor

        jadedalan 

        That's puzzling indeed. I can think of nothing relevant that would be impeding the C&R.

        I will send out for the Cavalry... 

        .

    • jadedalan's avatar
      jadedalan
      Copper Contributor

      George_Hepworth 

      Hi George

      It happens with all dbs.  Ones carried forward from earlier version of access, new-ish ones and a couple I've created just to see if I can make compact and back up work.  I have db access set to 'shared'.  If I try and start a compact whilst the db is open via the 'Compact and repair etc' icon on the 'Database Tools' toolbar then I immediately get an error.  The same happens If I close the db and start a dialogue via 'file/info/open file location'.  As soon as I select a db - the same error - 'see below'  Everything I've said also applies to back ups. 

  • Matteo's avatar
    Matteo
    Brass Contributor

    jadedalan 

    • How do you open it, just double-click?
      1. If yes, try press and hold Shift key, then double-click, do not release your finger until application opens. 
      2. press and hold Shift key again, use compact & repair
      3. use backup
    • check if its Shared or Exclusive, make it shared 
      • File\options\client settings\advanced, see open default mode

    I hope that helps.

Resources