Message pop up

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..
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top