hi,
I have a problem errors handling
I use this trigger code for handling an error (2279)
but I can not handle more than one error using this code
I tried this syntax within the below mentioned code
but it doesn't work at all
I need to handle more than one error in the same form using this syntax because it defines the fields that causes the error
I appreciate any suggestion
thank you very much
I have a problem errors handling
I use this trigger code for handling an error (2279)
but I can not handle more than one error using this code
I tried this syntax within the below mentioned code
Code:
Const INPUTMASK_VIOLATION = 2279 & 2113
Code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Const INPUTMASK_VIOLATION = 2279
Dim Msg As String
If DataErr = INPUTMASK_VIOLATION Then
Select Case Screen.ActiveControl.Name
Case "homePhone"
Beep
MsgBox "The phone you entered is invalid!", vbCritical
Me.HomePhone.Undo
[B]Case "BirthDate"[/B]
Beep
MsgBox "The birth date you entered is invalid!", vbCritical
Me.BirthDate.Undo
Case Else
Beep
Msg = "an error"
MsgBox Msg & Screen.ActiveControl.Name & "!"
Me.Undo
End Select
Response = acDataErrContinue
End If
End Sub
I appreciate any suggestion
thank you very much
Comment