I searched for this error, and I'm surprised it hasn't been asked. I get an 3218 error when trying to update a record. Can I program around it? Yes. But I'd like to know if someone else has dealt with this issue in a way that is easily addressed. i.e., Solve the error, instead using the equivalent of "On error resume next."
Situation
- I have to use SharePoint lists for my tables.
- I am capturing who changes a record and when, including changes to linked records [e.g., If the name of a document (linked record) has been updated on a translation certificate. I want to capture who changed it and when as part of the translation certificate record.] Each translation certificate records has "UpdatedBy" and "Udpated" fields.
- To stop people from making changes by mistake, the translation certificate form record is read-only. I use a pop-up edit form to make all changes. (e.g., status updates, changes to documents, changes to countries that receive the certificate, etc.)
- Because getting data from SharePoint lists can be slow and most of the time people are only looking at the data (not changing or adding new), I originally set the form's data to Snapshot instead of Dynaset.
I created a module to let me update the parent record whenever any changes are made to it or any of the child records (documents and languages). I've got 5 of more forms that have similar construction, but relate to different types of records (translations, printing, shipping, etc.), so I was hoping I'd be able to consistently apply one module that does this update to the parent record. I pass the table name and the parent record ID to the module. It works exceptionally well in the DEV environment, where all the tables are local, but when I deploy the programming to the live frontend that is tied to the SharePoint list backend, I get the "3218: Could not update; currently locked" error.
Here's what I've tried to problem-solve to get rid of the error, unsuccessfully.
- I've tried toggling between Snapshot and Dynaset.
- I've played around with the various RecordLock settings.
- By default, the database Option for Cache format compatible with 2010 and later was unchecked. I tried checking it and checking the Never Cache option.
- I've tried writing the Update module as either a RecordSet --> .Edit --> .Update sequence or as executing an UPDATE SQL statement.
- In the past, I closed the form, updated this type of data and reopened the form. I don't recall getting this error, but it's REALLY slow reopening because of SharePoint.
- If I just put the fields getting updates on the pop-up Edit form and update the data before saving the record, I have no issues--it's just not elegant and needs to be done in all circumstances.
- As I was typing this, it occurred to me that the form on which I first was getting this error is built on a query instead of a table--and my updates are just to one of those tables. I'll see if I can figure out if that's what is locking the record.
Thank you in advance for your time.