Solved Write Conflict Issue

Oludare

New member
Local time
Today, 21:32
Joined
Jan 28, 2021
Messages
24
Dear All,

Could you please help. I ran the below code which ran okay but displays a pop up windows on Write Conflict issue. Please help.
Th UpdateReissueStgData was ran okay.

Private Sub cmdSave_Click()

On Error GoTo Save_Error

'Update reissue data and Set ReissueFlg in dbo.Ledger table.
UpdateReissueStgData
Me.Dirty = False
DoCmd.Close acForm, "frmInsertReissueRecord"

cmdSave_Click_Exit:
DoCmd.Close acForm, Me.Name
Exit Sub

Save_Error:
If Err.Number <> 2501 And Err.Number <> 0 And Err.Number <> 30014 Then
modMessageHelper.ShowErrorMessage Err.Description, "frmInsertReissueRecord.cmdSave_Click", Err.Number
Resume cmdSave_Click_Exit
Else
DoCmd.Close acForm, "frmInsertReissueRecord"
End If

Exit Sub

End Sub


Regards
Timi

Olutimi
 
I'll bet that the UpdateReissueStgData refers to the same tables as the form is bound to.
So when you try and save the forms data using Me.DIrty = False it can't because you have already edited and saved the underlying data?
 
Thanks for the advice. I figured it out. I placed the Me.Dirty = False at the start of the form and it fixed it.
Many thanks for your efforts.
 
I would suggest you just remove that line completely.
 

Users who are viewing this thread

Back
Top Bottom