Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Wed Feb 25 09:24:11 CST 2009
Have struggled with the same problem in an app and have found no good solution - not even the definite cause. You can try setting Dirty = False but of course having it as True is telling you something which you may need to know. Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman Sent: Wednesday, February 25, 2009 7: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