Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-26-2007, 05:31 AM   #1
craigcain
Registered User
 
Join Date: Sep 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
craigcain is on a distinguished road
Messagebox help

I am trying to add an expression into a messagebox but I am not sure how to make access view it as an expression instead of as text (I am new at using the expression builder)

=MsgBox("The current severity rate is: @ «Expr» Reports![File name]![No of Lost Days].RunningSum «Expr» @ ",64,"Severity Rate")

I am sure that i am probably way off with the actual expression as well but I can look at that afterwards. Thanks in advance for any help.

craigcain is offline   Reply With Quote
Old 09-26-2007, 05:41 AM   #2
KenHigg
Registered User
 
Join Date: Jun 2004
Posts: 13,309
Thanks: 8
Thanked 155 Times in 129 Posts
KenHigg has a spectacular aura about KenHigg has a spectacular aura about
Are you trying to put the value of this control:

Reports![File name]![No of Lost Days].RunningSum

In a message box text?

If so, maybe something like:

Code:
dim tStr as string

tStr = "Some Text " & Reports![File name]![No of Lost Days].RunningSum & " Some more text"

msgbox tStr, 64,"Severity Rate"
???

ken
KenHigg is offline   Reply With Quote
Old 09-26-2007, 05:49 AM   #3
craigcain
Registered User
 
Join Date: Sep 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
craigcain is on a distinguished road
Yes I am trying to get the value of the running total and display it in the messagebox. Ill try doing it like in your example. Thanks for the help

craigcain is offline   Reply With Quote
Old 09-26-2007, 06:59 AM   #4
craigcain
Registered User
 
Join Date: Sep 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
craigcain is on a distinguished road
Thanks again it is now working. A problem that I still have though is that the file I am taking the data from needs to be open otherwise I get an error. Is there a way to open an access report in the following code somewhere?

Dim tStr As String

tStr = "The current severity rate is: " & Reports![File name]![No of Lost Days].RunningSum & " "

MsgBox tStr, 64, "Severity Rate"

Craig

craigcain is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to MessageBox contents of a table with a button alireza1989@hot General 6 03-01-2007 09:28 AM
messagebox query Dev123 Queries 1 02-28-2007 02:16 AM
BeforeUpdate and Cancel keep getting Messagebox though KyleB Modules & VBA 3 07-31-2006 06:12 AM
Moving a messagebox libby32 Forms 5 04-16-2003 05:57 AM
[SOLVED] Birthday messagebox help needed... kristian Macros 0 02-10-2001 05:45 AM




All times are GMT -8. The time now is 05:04 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World