I have an Access database with a table called "Post" and a field called "body" which was long text RTF. I was constantly getting:
Could not update; currently locked by another session on this machine
To reproduce
- Create a table called Post with a long test field of type RFT.
- Create two separate forms that access Post.Body
- Open one form, and add more than 2000 characters (not sure about the threshold, but only occurs with large data) to Post.Body. Navigate to a different record and then back
- Open a second form that displays Post.Body
- Navigate both forms to the same record with the long text. Try editing the text and then saving (navigating to another record)
Observed
- "Could not update; currently locked by another session on this machine"
- Have to restart Access to fix.
Other Scenarios
- The same issue happens if there is a form and a report that both have the RFT control and they point to the same record, and you try to edit the text in the form.
- If the second form edits the same record, but does not have the RTF control, there is no problem.
- If the report points to the same record, but does not have the RTF control, there is no problem.
- I tried with the forms both in the same database as the tables as well as with the table linked from another database, and the same problem.
- I tried the various lock options under "Options" and had the same problem.
Conclusion
This seems like a Microsoft Access bug. The fact that a report, which can't even edit the data and should be doing a non-locking read causes the issues, suggests it's a bug.
Fix
I have to make sure no one opens a second screen that views the same record with the RTF control while someone is editing the RTF value.
I tried refresh and other possible fixes I found online, but for whatever reason, I still had the problem.