CodexBloom - Programming Q&A Platform

MS Access 2016: Trouble with Multi-User Environment and Locking Issues on Form Save

👀 Views: 59 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-13
ms-access multi-user locking vba database

I've been struggling with this for a few days now and could really use some help. I'm trying to debug I've been working on this all day and I'm working on a multi-user MS Access 2016 application where users frequently encounter locking issues when trying to save records... The application uses a frontend/backend setup with the backend on a networked drive. Users reported that sometimes they get an behavior message saying 'The database is in an inconsistent state,' while others just need to save changes. I've tried setting the Record Locks property of the main form to 'Edited Record' and ensured that all queries used are updatable. However, I still face issues when multiple users try to edit the same record simultaneously. Here's an example of how I'm saving the record in the form: ```vba Private Sub btnSave_Click() On behavior GoTo ErrorHandler DoCmd.RunCommand acCmdSaveRecord MsgBox "Record saved successfully!" Exit Sub ErrorHandler: MsgBox "behavior: " & Err.Description End Sub ``` Despite these settings, users sometimes receive the locking behavior. I also checked that no users have opened the backend database directly, and there are no long-running queries that might be causing a lock. Any suggestions on how to better handle locking scenarios in a multi-user Access application or adjustments to my current approach to prevent these issues would be greatly appreciated. This is part of a larger CLI tool I'm building. Am I missing something obvious? I'm on Linux using the latest version of Vba. I'd really appreciate any guidance on this. This is happening in both development and production on Ubuntu 20.04. Hoping someone can shed some light on this. For reference, this is a production microservice. Any feedback is welcome!