jonsuns7
asked on
MS Access 2007 - Want Variable to display in Message Box
I have some simple code In which I want a variable to display in a message box.
Even though I copied some sample code it still does not work.
Here is the code:
Dim LValue As String
LValue = Now
MsgBox "The current Time is: " & LValue & " Have a Good Day"
Note: This uses a Now function to put a time value into the variable. Also, I have tried to put regular string text into the variable and that doesn¿t display either.
Thanks for any help.
Even though I copied some sample code it still does not work.
Here is the code:
Dim LValue As String
LValue = Now
MsgBox "The current Time is: " & LValue & " Have a Good Day"
Note: This uses a Now function to put a time value into the variable. Also, I have tried to put regular string text into the variable and that doesn¿t display either.
Thanks for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In the VBA editor ... Menu >> Debug >> Compile .... are there any errors ?
mx
mx
<No points wanted>
I'm with MX...
Dim LValue As Date
LValue = Now
MsgBox "The current Time is: " & LValue & " Have a Good Day"
...works fine for me
Perhaps you should state exactly what "Does" appear when you run the code...
Is this an issue in all forms?, for all users?, in all databases?
I'm with MX...
Dim LValue As Date
LValue = Now
MsgBox "The current Time is: " & LValue & " Have a Good Day"
...works fine for me
Perhaps you should state exactly what "Does" appear when you run the code...
Is this an issue in all forms?, for all users?, in all databases?
ASKER