William Hindman
wdhindman at dejpolsystems.com
Wed Feb 25 09:15:44 CST 2009
...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