T
TM
Hello,
Having a difficult time trying to set the focus back to a control that has
an error.
After tabbing out of the field without changing the contents. the value of
TYPECDE should be null.
The following code is attached to the On Exit Event.
If IsNull(Me.TYPECDE) Then
MsgBox ("Type Code must be a 1 or 2")
TYPECDE.SetFocus
End If
If Me.TYPECDE = "1" Then Me.txtTranType = "Pickup"
If Me.TYPECDE = "2" Then Me.txtTranType = "Delivery"
MsgBox works fine, but the cursor always ends up in the next control.
Any thoughts?
Having a difficult time trying to set the focus back to a control that has
an error.
After tabbing out of the field without changing the contents. the value of
TYPECDE should be null.
The following code is attached to the On Exit Event.
If IsNull(Me.TYPECDE) Then
MsgBox ("Type Code must be a 1 or 2")
TYPECDE.SetFocus
End If
If Me.TYPECDE = "1" Then Me.txtTranType = "Pickup"
If Me.TYPECDE = "2" Then Me.txtTranType = "Delivery"
MsgBox works fine, but the cursor always ends up in the next control.
Any thoughts?