[AccessD] Write Conflict

Drew Wutka DWUTKA at Marlow.com
Wed Feb 25 10:03:50 CST 2009


Can you try changing the updates to SQL statements that update the
actual record, and not the form?

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William
Hindman
Sent: Wednesday, February 25, 2009 9:16 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Write Conflict

...first time I've seen this one

...cbf
------------------------------------------------------------------------
-----------------
Option Compare Database
Option Explicit

Private Sub cboParticipantType_AfterUpdate()
    ' Force save and refresh records

On Error GoTo HandleErr

    DoCmd.RunCommand acCmdSaveRecord
    Me.Requery

exithere:
    Exit Sub

HandleErr:
    Select Case Err
        Case Else
            MsgBox Err & ": " & Err.Description, vbCritical, _
             "Error in 
Form_frmCompanyEventsSub.cboParticipantType_AfterUpdate"
    End Select
    Resume exithere
    Resume

End Sub

Private Sub Form_Dirty(Cancel As Integer)
        'MsgBox "Record Changed"
    On Error GoTo Form_Dirty_Error

        Parent!txtUpdated = Date   'update the LastUpdated to today's
date 
if the form record was changed.
        Parent!txtUpdateBy = Environ("USERNAME")
        Me.Repaint

   On Error GoTo 0
   Exit Sub

Form_Dirty_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure 
Form_Dirty of VBA Document Form_frmCompanyEventsSub"

End Sub

------------------------------------------------------------------------
-----------------

...the Form_Dirty is the new code ...works elsewhere in main forms
without 
problems ...but this is a sub and I'm changing field data on the parent.
...I get a Write Conflict dialog box "This record has been changed by 
another user" with three buttons:
 "Save Record" "Copy to Clipboard" "Drop Changes" ...annoying to say the

least
...any idea why this is happening?

William
 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list