Solved

How embed a calculation in a message box?

Posted on 2011-03-10
2
333 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 250 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 250 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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 …
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.
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…

742 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