Hi, Wish someone could help me I only Teach my self of the net
So Anyone can help and make this VBA works with bound control boxes, Note that it works fine with Unbound boxes
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Const conErrRequiredData = 2107
'this codeabove comes up with 2 different controls (TextA) and (TxtB)
If DataErr = conErrRequiredData Then
If Me.TxtA <> "Mthfwd" Then
DoCmd.OpenForm "MsgErr_Mob"
Response = acDataErrContinue
Else
If Me.TxtB <> "Mthfwd" Then
If DataErr = conErrRequiredData Then
DoCmd.OpenForm "MsgErr_Lmct"
Response = acDataErrContinue
Else
Response = acDataErrDisplay
End If
End If
End If
End If
End Sub
So Anyone can help and make this VBA works with bound control boxes, Note that it works fine with Unbound boxes
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Const conErrRequiredData = 2107
'this codeabove comes up with 2 different controls (TextA) and (TxtB)
If DataErr = conErrRequiredData Then
If Me.TxtA <> "Mthfwd" Then
DoCmd.OpenForm "MsgErr_Mob"
Response = acDataErrContinue
Else
If Me.TxtB <> "Mthfwd" Then
If DataErr = conErrRequiredData Then
DoCmd.OpenForm "MsgErr_Lmct"
Response = acDataErrContinue
Else
Response = acDataErrDisplay
End If
End If
End If
End If
End Sub