Solved

WRITE CONFLICT IN ACCESS 2000

Posted on 2001-07-05
7
309 Views
Last Modified: 2007-12-19
I am getting a great deal of WRITE CONFLICTS in Microsoft Access ADP database.  Anytime I make a change and do a Me.Requery or a DoCmd.RunCommand acCmdSaveRecord.  I get WRITE CONFLICT Save Record/Copy to Clipboard/Drop Changes.  I am the same user making changes.  I tried using the requery after every update to the record and I still get the error on the Me.Requery.  I am getting tons of these CONFLICTS.  Any suggestions?
0
Comment
Question by:sbornstein
  • 3
  • 2
  • 2
7 Comments
 
LVL 14

Expert Comment

by:mgrattan
ID: 6257128
This can occur if you are using the same table in more than one record source on the form/page.  For example, you're using a query that joins Orders and Customers together in the main form so you can display the customer's name from the Customers table.  Then, in a subform, you are using the Customers table again in order to display the contact information for the customer.  You then make a change to the customer information in the sub-form and you get a write conflict because that customer record is already open in the main form's record source.

This is just a basic example, but it should give you something to check in your form's record sources.
0
 
LVL 4

Expert Comment

by:MacRena
ID: 6265102
sbornstein,
I went through this same maddening problem a few months ago.  And it kicked my butt for a long time, too.

What I had done was added a bit of code in the form's OnCurrent event that put some value into a bound field.  (I was using a DLookup to put the default State Tax from a Preferences table).  The problem was that, by placing a value into a bound field, I was creating a NEW RECORD.  Then when the Me.Refresh (or requery - I don't remember) executed, there was no value in the PrimaryKey field, and Access gave the "WRITE CONFLICT" error, even though I was doing this stand-alone.
See if there is any code that places a value into a bound field from a Form's event and move that code to the PrimaryKey field's OnUpdate event (or some other event that won't execute until the record is created for real).
HTH.
Mac
0
 
LVL 4

Expert Comment

by:MacRena
ID: 6275176
Any luck, sbornstein?
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 14

Expert Comment

by:mgrattan
ID: 6286429
sbornstein,

Please give us an update.  If you need further assistance, you need to provide feedback.
0
 

Author Comment

by:sbornstein
ID: 6290501
Hey MacRena I think you might be onto something sorry for the long delay I was on vacation.  Yes anytime we do a Me.Refresh it seems to cause the conflict.  Any further advice I am looking into that now
0
 
LVL 4

Accepted Solution

by:
MacRena earned 300 total points
ID: 6290555
sbornstein,
Thanks for replying (hope you had a great vacation)

As I stated above (and I don't really have more to add), I got that error when I had some code putting a value into a bound field when a form opened to a new record or after a record was saved and the form went to the EOF (before the next record was actually created).

Look for an event or a control's "Default Value" that  puts a value into a bound field without there being a record actually created.

Mac
0
 

Author Comment

by:sbornstein
ID: 6291795
Well MacRena that was not the exact answer but a good response that got me looking.  I ended up calling a function after anything was being updated that requieried the form and it resolved all the issues for the most part.  So you got the points one thing for earning these I was wondering if you had any ideas.  What I am doing is trapping the conflict when 2 users edit at the same time which is what I want.  But I can get the code to UNDO the changes and then allow the user to select out of the textbox to go onto another record.  Here is what I have so far which fires but keeps firing if the user tries to move after this occurs.

Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
  Case 3260
     Response = acDataErrContinue
     MsgBox "Record is being edited by another user, please try again later: Err 3260", vbExclamation
     DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
     End
  Case 2757
     Response = acDataErrContinue
     MsgBox "Record is being edited by another user, please try again later: Err 2757", vbExclamation
     DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
     End
Case Else
     Response = acDataErrContinue
     MsgBox "Record is being edited by another user, please try again later:" & DataErr, vbExclamation
     DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
     End
End Select
End Sub
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question