Using the Value of a variable in an expression

B

Bob W

I have done this before but forgot how.
I want to assign "Smith" to a report textbox with a programed defined
name- FAMA.
Dim strSuffix As String, strVariable As String
strSuffix = "A"
strVariable = "FAM" & strSuffix
?strVariable? = "Smith"
where ? ? is desired punctuation to indicate to use the value of this
variable, not the name.
 
J

John Vinson

I have done this before but forgot how.
I want to assign "Smith" to a report textbox with a programed defined
name- FAMA.
Dim strSuffix As String, strVariable As String
strSuffix = "A"
strVariable = "FAM" & strSuffix
?strVariable? = "Smith"
where ? ? is desired punctuation to indicate to use the value of this
variable, not the name.

Try Me.Controls(strVariable) = "Smith"


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top