Writing the Form_Error Event Procedure
Private Sub Form_Error(DataErr As Integer, Response As Integer) Dim custId As String Const conDuplicateKey = 3022 If DataErr = conDuplicateKey Then Response = acDataErrContinue Debug.Print "Customer " & custId & " already exists." End If End Sub