Message pop up

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If a certain number is entered into a Test Box - I need to have a message pop
up.

This is my code but it's not working - please look down If
(Me.MBR_GROUPNO)..... I just wanted you to have an idea of what I'm doing..:

If IsNull(Me.MBR_GROUPNO) Or IsNull(Me.MBR_GROUPNAME) Or
IsNull(Me.MBR_COUNTYCODE) Then
If IsNull(Me.MBR_GROUPNO) Then
MsgBox "Please enter Group Number"
DoCmd.CancelEvent
End If

If (Me.MBR_GROUPNO) = "9999" Then
MsgBox("Are you sure", vbYesNo) = vbNo Then
Cancel = True
End If

End Sub


Could someone PLEASE help me..
 
Try this
If IsNull(Me.MBR_GROUPNO) Or IsNull(Me.MBR_GROUPNAME) Or
IsNull(Me.MBR_COUNTYCODE) Then
If IsNull(Me.MBR_GROUPNO) Then
MsgBox "Please enter Group Number"
DoCmd.CancelEvent
End If

If (Me.MBR_GROUPNO) = "9999" Then
If MsgBox("Are you sure", vbYesNo) = vbNo Then
Cancel = True
End If
End If
End If
End Sub
 
Back
Top