Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Unanswered: Write Conflict Error - Runtime error 3197

    I have a form and subform.

    there is an toggle button on the main form that allows the user to select whether to update the present row in the subform - one row at a time or the other option to do batch updates based on certain criteria.

    When the one row at a time option is selected - the subform dta behaves as expected.
    However when I invoke the batch update option and run the following Currentdb.execute statement on the refresh or requery i get the Write Conflict message - obviously when I click "save The Record" all the subsequent rows matching the criteria are updated - but I do not want the user to see that message

    CurrentDb.Execute "update tblmaterials_pull_ticket_child set parent_id = " & Me.Parent.pull_ticket_id & " , request = true " _
    & "where container = " & "'" & Me.Container & "'"


    In the past I have skirted this issue with the following statement:

    If Me.Dirty Then
    Me.Dirty = False
    End If

    Any suggestions would be more than appreciated.
    Dale Houston, TX

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    As a suggestion: Always add a CurrentDb.Execute strSQL, dbFailOnError
    Set db = Nothing
    You may have to change your Data Type to Int and or use a date so that it know what was the last record to make a comparison to.You have NON matching data is why!

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    It is not non-matching data and all of the records are in fact updated - however it is when I move of the record in the sub-form that the messge pops up. It is not an error - it is Jets way of saying that the reocord or recordset is being updated by another source3 (in this case the records in the update statement. )

    I have seen this message before and prevented it by using :
    if me.dirty = true then me.dirty = false

    But it does not seem to workk at the subform level.
    Dale Houston, TX

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Quote Originally Posted by axsprog View Post
    I have seen this message before and prevented it by using :
    if me.dirty = true then me.dirty = false

    But it does not seem to workk at the subform level.
    You could try:
    Code:
    With Me.SubFormName.Form
        If .Dirty = True Then .Dirty = False
    End With
    Have a nice day!

  5. #5
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    going to try that in ablout 10 minutes LOL
    Dale Houston, TX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •