referencing a string

drusteeby

Registered User.
Local time
Today, 11:38
Joined
Jul 9, 2009
Messages
29
Im sure this is a simple syntax mistake on my part but I cannot figure it out, in my code below how would i get the value that is in the string to show up in the message box?

Thanks.

Code:
Dim currentSTRNum As String

currentSTRNum = CStr(Forms![STR Log]!txtSTRserialNumber)
 
msgbox ( & currentSTRNum & )
 
It would simply be:

msgbox currentSTRNum

you would only use the & if you wanted to add text to the message box like this:

msgbox "The string value is " & currentSTRNum & ". I hope this is the number you are looking for"
 
Thank you :cool:
 

Users who are viewing this thread

Back
Top Bottom