Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can't get message box to appear

Posted on 2013-01-18
2
Medium Priority
?
336 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

927 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