Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How embed a calculation in a message box?

Posted on 2011-03-10
2
Medium Priority
?
344 Views
Last Modified: 2013-11-05
I have a calculation..  DSum("[Qty]", "tblFinGoods", "[PartN] = '" & Me.txtPart_No & "'") in an after update event of a field combobox.  I want the result of this DSum calculation to be embeded in a message box..     Kind of like...

"You have 000 parts in stock".   (The "000" is the calculation from the DSum.)

How can I do this?

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 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1000 total points
ID: 35101435
dim vSum

vSum=DSum("[Qty]", "tblFinGoods", "[PartN] = '" & Me.txtPart_No & "'")

msgbox "You have " & vSum & " parts in stock".
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 35101454


Dim x as Single

x =  DSum("[Qty]", "tblFinGoods", "[PartN] = '" & Me.txtPart_No & "'")

Msgbox "You have " & x & " parts in stock"

mx
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

636 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