Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 3022
DoCmd.SetWarnings False
Response = acDataErrContinue
MsgBox "This event already exists. Please change the date and/or event you have added. Msg 3022"
Case Else
Response = acDataErrContinue
MsgBox "Other error occured." & Chr(13) & "Error: " & DataErr
End Select
End Sub
|