Solved

Can't get message box to appear

Posted on 2013-01-18
2
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 61

Accepted Solution

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

Expert Comment

by:mbizup
ID: 38794538
Alternatively, use the after update event.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

630 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