Solved

How embed a calculation in a message box?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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 …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

756 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