Does your Microsoft Access returns the error “Write Conflict: Record Has Been Changed By Another User”? If you are a victim of this MS Access Write Conflict error. Then this post will surely provide solution to troubleshoot your issue. So, let’s get started with the information regarding each and every point of this Access Write Conflict error.
About Microsoft Access Write Conflict:
Access displays such write conflict error when you and other person attempts to write on the same record in database mainly at the same time. Default locking strategies is for granting the ownership of lock to the first person who attempts for writing on the record. Other person can save the record before you do but you can stop this as you have own the lock.
Microsoft Access may return the error: “Write conflict: Record has been changed by another user”
What Are The Symptoms Of Access Write Conflict?
- When you start editing the data which uses multiple forms have same records source, you may get the following error message.
- Records have been changed by another user since you started editing it. If you save the record now then the changes made by other user gets overwrite.
- Copying changes to the clipboard will let you see the values that other users have entered and then paste your changes back in if have already decided to make changes.
What Are The Causes Of MS Access Write Conflict?
This write conflict error usually encounters when you open two forms that updates the same data and source at same time.
After then you will see that the first apply the edit lock over the record/records. And the 2nd form modifies the records after then save changes. So, when you try to close down the first form and starts writing again on the table. This time the changes made in 2nd form are identified. This will cause the error again.
Well there are two main reasons why this write conflict Access error occurs:
- When the Access database is shared and another person is attempting to write to the same. In such case, first person attempts to write to records own the lock.
- May be the two objects open in the same time and from the same access database. Both objects are trying to write on the same record. The very first object that tries to write to record owns the lock.
- While updating a string field which contains binary zeroes. Well this situation occurs with or without jet compatibility specified in data source.
How To Resolve The MS Access Write Conflict Error?
Well you have the three main options to fix down this MS Access Write Conflict issue.
Solution 1# Save Record:
You can just overwrite the changes made by other person. As you were the first to make editing to the record, you own the lock. Whereas the other person losses their changes, if you avoid using this option.
Solution 2# Copy to Clipboard
The complete record is copied on the clipboard with the changes that you have made and then changes made by other person are displayed on the record. You can accept this change or overwrite the changes made on what is saved in clipboard.
Solution 3# Drop Changes
Instead of this you have own the lock, you let the other person to keep their saved changes.
Solution 4# Steps To Resolve Writing Conflict Error In (.Mdb) File
To resolve this issue, you can use any of the two method mentioned below for a Microsoft Access database (.mdb) file or an Access project (.adp) file.
Method 1: RecordLocks property
You need to set the RecordLocks property of form to edited record. To perform this just tries the following steps:
1.First of all you need to Open the MS Access form in Design View.
Note:In Access 2007, go to step 3.
2.From the View menu, tap to the Properties option.
3.On the Data tab, change the Record Locks property to Edited Record.
Method 2: Add Code To The Ondeactivate Event Procedure
Second method is to add code to the OnDeactivate event procedure of both the forms in order to save the record. So, for doing this, follow down theses steps:
- Open Form in Design View
For Access 2007 user: just go to step 4.
- Go to the View menu and then hit the Properties
- On Edit menu option, hit the select Form
- On event tab, make a right click in the OnDeactivate property box, and then tap to the Build option.
- From the Choose Builder box, hit the Code Builder option and then hit OK
- After then type or paste the following code:
- Just open the 2nd form in design view and repeat the step from 2 to 6.
Solution 5# Steps To Resolve Writing Conflict Error In Microsoft Access Project (.adp) file
To save the record you need to add code to the OnDeactivate and OnActivate event procedures of both forms. To do this, have a look over the fixes.
- At first open the form in Design View.
Note: Access 2007 user: go to the step 4.
- Go to the View menu, tap to the Properties
- From the Edit menu, hit the Select Form.
- Now go to the Event tab and make a right click in the OnDeactivate property box, and then hit the Build
- From the Choose Builder box, tap to the Code Builder option, after then hit the OK button.
- Now either type or paste the following code:
- Go to the file Menu, tap to the Close and return To Microsoft Access.
- From the Event tab, make a right click OnActivate property box, and then hit to the Build option.
- From the Choose Builder box, hit the Code Builder option, and then tap to the OK button.
- Now Type or paste the following mentioned code:Note:well the sample code given in this post uses Microsoft ActiveX Data Objects. To run the code correctly, must reference the Microsoft ActiveX Data Objects 2.x Library (where 2.x is 2.1 or later).
To do this, you need to first go to the Visual Basic Editor and here click References on the Tools menu. Make sure that Microsoft ActiveX Data Objects 2.x Library check box is checked or not. If it is not then check it out.
Dim rs As ADODB.Recordset
Set rs = Me.Recordset.Clone
rs.Bookmark = Me.Bookmark
Me.Bookmark = rs.Bookmark
Set rs = Nothing
- Now open the second form in Design view, and then repeat the step from 2 to 10 once more for this second form.
During the execution of the above solution if in case your Access database data gets corrupted then at that point what will be your initiative.
Don’t get panic….because there is solution for this sarcastic situation too i.e Access Repair N Recovery solution. As, it is the best recommended option to repair any type of corrupted /damaged or lost Access Database. With this proficient software tool you can fix any kind of corruption issue encountered in .accdb or .mdb file.
Trying the above fixes will surely resolve your MS Access writing conflict issue. So, try them confidently…! If you encounter any other issue besides this then do share it with us in our FAQ Section.