Solved

WRITE CONFLICT IN ACCESS 2000

Posted on 2001-07-05
7
278 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
Comment Utility
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
Comment Utility
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
Comment Utility
Any luck, sbornstein?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 14

Expert Comment

by:mgrattan
Comment Utility
sbornstein,

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

Author Comment

by:sbornstein
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now