I want to confirm a number was entered before allowing the click to proceed. The click does work on its own but when I add the first If statement below it does not display the message....howe ver when I change to greater than (>), it does run the 1st message below when a number is entered. It just doesn't display the message when it is set to less than (<) and no number is entered.
Private Sub Add_Work_Order_ __Click()
If Me.Work_Order_N um < 1# Then
MsgBox "You must enter a work order number for this request."
End If
Dim Msg As String
Msg = "Have you confirmed all information is accurate?"
If MsgBox(Msg, 32 + 4) = 6 Then
SendKeys "%egw"
DoCmd.GoToRecor d , , acNewRec
End If
End Sub
Private Sub Add_Work_Order_ __Click()
If Me.Work_Order_N um < 1# Then
MsgBox "You must enter a work order number for this request."
End If
Dim Msg As String
Msg = "Have you confirmed all information is accurate?"
If MsgBox(Msg, 32 + 4) = 6 Then
SendKeys "%egw"
DoCmd.GoToRecor d , , acNewRec
End If
End Sub
Comment