Results 1 to 3 of 3
  1. #1
    dgmdvm is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Mar 2014
    Posts
    84

    Access file lock issue

    Three months ago I deployed my access database. It is being used on a small network with 3 workstations, one of the workstations contains the shared drive the back end file is located on. On two occasions since I installed it they have gotten locked out of the db because the locking file for the back end hasn't gotten deleted. When this occurs you get the following message:


    Click image for larger version. 

Name:	Db error.png 
Views:	21 
Size:	63.5 KB 
ID:	37376
    where shared docs is the shared folder on the network and non-profit database.accdb is my back end file. All 3workstations are running Access 2016 and Windows 10 pro.
    I haven't been able to get any accurate details from the users as to what might have transpired to create such an error. I am guessing that someone left the Db open and then shut down the workstation?? Alternatively, the office administrator tends to leave all her programs open when she leaves for the day so an unscheduled shutdown or power failure might cause this too.
    I manually delete the .laccdb file to get the system up and running again but I would prefer not to have to do this. Other than gently telling all the users to close the db when they are finished for the day should I be considering any other steps to prevent the issue?

    thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    That IS the only solution. Occasionally, a FE crashes, or forgets to exit the .laccdb , and the only fix is to manually delete it.
    An idea, make a vb program,(excel) that runs in the background (or server daemon, or 'phantom') and is constantly deleting the file and ignores the error.


    Code:
    sub On_Timer()
    KillFile "//server/folder/myDb.laccdb"
    end sub
    
    Public Sub KillFile(ByVal pvFile)
    Dim FSO
    On Error Resume Next
    Set FSO = CreateObject("Scripting.FileSystemObject")
    'FileReadOnly pvFile, False
    FSO.DeleteFile pvFile
    Set FSO = Nothing
    End Sub
    a automatic timer deletes the file every minute, but if someone is in it, the delete fails. (until it doesn't)

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Any new users added whose folder rights don't include delete? If so, Access cannot delete the lock file when they shut down db.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-21-2018, 07:46 PM
  2. Replies: 5
    Last Post: 11-13-2017, 02:09 PM
  3. access error 3050 could not lock file
    By donnan33 in forum Security
    Replies: 3
    Last Post: 02-08-2012, 06:37 PM
  4. Replies: 11
    Last Post: 07-17-2011, 08:56 PM
  5. make the access file lock
    By naggappan in forum Security
    Replies: 1
    Last Post: 03-21-2011, 07:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums