Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring to a control with a variable

Status
Not open for further replies.

rplant

MIS
Aug 20, 2002
10
US
Does anyone know how to refer to the name of a text box with a variable?

Here is an example of what I need:

If a text box is named txtRate and
strTest = "txtrate"

I want to be able to refer to the control using the string:
me.[strTest].value = whatever
 
Hi!

You can do it like this:

Me.Controls(strTest).Value = whatever

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top