Solved

Can't get message box to appear

Posted on 2013-01-18
2
268 Views
Last Modified: 2013-01-18
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
0
Comment
Question by:SteveL13
  • 2
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
Comment Utility
If you're using the change event add .text after txtnewqtyshipped.
0
 
LVL 61

Expert Comment

by:mbizup
Comment Utility
Alternatively, use the after update event.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now