Solved Locked DB file, cannot delete; cannot open user file (1 Viewer)

mjdemaris

Working on it...
Local time
Yesterday, 22:10
Joined
Jul 9, 2015
Messages
424
Hello,

In the last week or so we've been experiencing a ton of errors, and now I am a little stuck in the mud. (And I'm hoping this is not because of an update MS recently put out that interferes with Access! which I read about earlier today.)

I've been experimenting with copying, renaming and creating new DB files, but I always seem to end up with a ".laccdb" file that won't go away after closing the program. Up until I created a new front end file, and imported and linked everything I thought I needed, I always had an error, on closing the front end file, that I could not open the file because it's used by someone else. Of course I was the only one.

Now, the first time I opened and closed the new FE file, no errors, but the ".laccdb" remains, and I cannot delete it. I cannot open the FE file unless I open Access and browse to it.

I'll have more on this later, as it's time for me to close up shop.

mike
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:10
Joined
May 7, 2009
Messages
19,169
the error is somewhat caused by recent windows update.
if i recall the possible solutions:

1. rollback the update, or
2. put your db in Trusted Location (again).
 

ypma

Registered User.
Local time
Today, 05:10
Joined
Apr 13, 2012
Messages
643
Just a suggestion, ensure no other users are using your your FE, Reboot your pc not re-start and open up the folder and locate the locked file and hopefully you should now be able to delete it. Also might be worth checking your task manager to ensure not access programmes are running. I am a user not a profession so there maybe other solutions.
 

GPGeorge

Grover Park George
Local time
Yesterday, 22:10
Joined
Nov 25, 2004
Messages
1,776
Hello,

In the last week or so we've been experiencing a ton of errors, and now I am a little stuck in the mud. (And I'm hoping this is not because of an update MS recently put out that interferes with Access! which I read about earlier today.)

I've been experimenting with copying, renaming and creating new DB files, but I always seem to end up with a ".laccdb" file that won't go away after closing the program. Up until I created a new front end file, and imported and linked everything I thought I needed, I always had an error, on closing the front end file, that I could not open the file because it's used by someone else. Of course I was the only one.

Now, the first time I opened and closed the new FE file, no errors, but the ".laccdb" remains, and I cannot delete it. I cannot open the FE file unless I open Access and browse to it.

I'll have more on this later, as it's time for me to close up shop.

mike
One of the best resources available on the latest bug release for Access is here.
 

isladogs

MVP / VIP
Local time
Today, 05:10
Joined
Jan 14, 2017
Messages
18,186
Another possible solution is to open the database using the shift bypass, compile then close. The lock file seems to get deleted correctly.

However, I've also been using task manager to forcibly close Access multiple times in the past two days
 

mjdemaris

Working on it...
Local time
Yesterday, 22:10
Joined
Jul 9, 2015
Messages
424
@Gasman : Yes, I read the article(s) on the bug, and discovered that I am running a Windows 11 (365) Beta build, ver. 2201 build 14827.20158. All the problems I am working on right now is involving the FE on my local machine. The lock file seems to prevent me from double clicking or pressing Enter to open the program. One problem is: You attempted to open a database that is already opened by user 'Admin' on machine (mine).

Compact/repair has done nothing to help. Out IT dept has assisted me in uninstalling the last couple of updates in this time frame, to no avail.

@isladogs : I constantly use Task Manager to close Access, not every time tho, and sometimes find an instance of Access "open" but not visible on the screen. This behavior still baffles me - how it can be "open" but not visible, not able to switch to it via Alt-Tab.

If I can't solve the issues locally, then I cannot solve them on the network.

Just now, I created a new folder in my Documents folder, copied my FE and BE files over, used shift-enter to open, and I saw something happen, but no Access screen popped up. A lock file presented itself, and Task Manager shows Access open. End task...Access "closes", lock file is removed.

Open Access from Task Bar - Ok. Enable Content. Delete linked tables. Relink three BE files. Activate startup macro, open forms, close FE, same problem. End task second time, lock file remains visible.

@arnelgp : Open Access from Task Bar...Add Document folder to Trusted Location, which I thought it was by default. Open FE via Access open menu, close FE, no problem...2nd time no problem.

double click to open FE, does not even open Access this time, but a lock file appears. reopen Task Mgr, no Access listed.

Open Access and FE from Task Bar, no problem. Try again, but this time only Compact and Repair... Same error: try to open a database already opened.

Lock file is persistent. Cannot delete the lock file. Cannot make changes to code because of the lock file.

Now what? Create a new trusted location? created new folder, copied files over except lock file. compact and repair, again. Open FE with Enter key and double click... seems to work so far.

Now...after several attempts to break it, using the same procedures that produced the errors earlier, it seems to have to problems.

Question: on the network: If I add the network location to the Trust Center, load the FE on the network, will it work? Would I need to create a new folder? I will attempt to use the OG files that had the problems to begin with using an updated Trust Center setting and go from there.

@ypma : As for restarting the PC and deleting lock files: in this case, it does not work. Years ago, around Windows 7 and earlier, I remember there was a way to delete these files, but things have changed and I do not have Admin rights.

If I was a full-time Dev me thinks this might be easier, lol.
 

isladogs

MVP / VIP
Local time
Today, 05:10
Joined
Jan 14, 2017
Messages
18,186
There have been reports that the recent update removes existing trusted locations.
MS are recommending that both the FE and BE are in trusted locations to resolve this issue.
So make sure you check the BE is also trusted
 

mjdemaris

Working on it...
Local time
Yesterday, 22:10
Joined
Jul 9, 2015
Messages
424
I'm not completely sure how MS has this tied together, but as the 'owner' of the Access files, once I add the Trusted Locations, then all is good. In my case, I got admin rights for the day and ended up changing a Registry value so that I could use an environment variable in the path, thinking that I was going to use it in Access... well, I think I confused myself whilst I was searching for the information I wanted and landed on a slightly different method...

Bottom line is, every user's FE needs to be changed for their local FE path, and the BE files location needs to be added.

So, if the users read my email and follow the directions...they should be golden. But we all know how well that works!!

Thanks guys for all the input!

Mike

By the way, this seems to have solved other issues as well:
  • error 3048
  • error 3211
  • maybe another one that popped up but don't recall
 
Last edited:

Users who are viewing this thread

Top Bottom