?
Solved

How embed a calculation in a message box?

Posted on 2011-03-10
2
Medium Priority
?
340 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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