Error message form with Bound Control Boxes

ROland58

New member
Local time
Today, 15:54
Joined
Sep 9, 2015
Messages
5
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
 
the bound boxes will show data, but you need unbound to display your error codes via code.
or
the bound box is set to a list of errors table.
 

Users who are viewing this thread

Back
Top Bottom