Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Can't get message box to appear

On a form I have a field named "txtNewQtyShpd".  When the user enters a value in another field on this form ("txtShipQty"), it gets updated.  When the value of this field, ("txtNewQtyShpd") is equal to or larger than another field named, "txtOrdQty", I want a message box to appear.

Here's my code but it doesn't work.  (I've tried it in the onchange event in "txtNewQtyShpd"

    If Val(Me.txtNewQtyShpd) >= Val(Me.txtOrdQty) Then
        MsgBox "You have shipped the quantity on order.  This order should be closed."
        DoCmd.OpenForm "frmCloseOrder"
    End If

--Steve
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alternatively, use the after update event.