BarryMK
4 strings are enough
- Local time
- Today, 13:32
- Joined
- Oct 15, 2002
- Messages
- 1,350
I'm using the code below to prompt users to fill in two combos before moving to the next tab page on my form.
It works when both combos are empty but if I update the first combo and press the LOST button again it fires the setfocus event. Is this a "null" problem?
It works when both combos are empty but if I update the first combo and press the LOST button again it fires the setfocus event. Is this a "null" problem?
Code:
Private Sub cmdLost_Click()
Dim Msg As String
If IsNull(Me.cmbBreed) Or (Me.cmbColour) Then
MsgBox "Fill in Breed and Colour Now." & vbCrLf & "Then click the LOST button again.", vbInformation, "Required fields!"
DoCmd.CancelEvent
Else
Me.Mutt.SetFocus
End If
End Sub