Messagebox help (1 Viewer)

craigcain

Registered User.
Local time
Today, 12:31
Joined
Sep 26, 2007
Messages
15
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.
 

KenHigg

Registered User
Local time
Today, 07:31
Joined
Jun 9, 2004
Messages
13,327
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
 

craigcain

Registered User.
Local time
Today, 12:31
Joined
Sep 26, 2007
Messages
15
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

Registered User.
Local time
Today, 12:31
Joined
Sep 26, 2007
Messages
15
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
 

Users who are viewing this thread

Top Bottom