|
-
Feb 1st, 2006, 03:25 PM
#1
Thread Starter
Junior Member
[RESOLVED] populating the control name from a variable
hi,
How do I explain this.. I have a form where the user enters in upto 49 values. I need to get the last 3 values entered.
example user polulates textboxes 1 to 6 (called text1,text2,text3,text4,,etc) with the values a,b,c,d
I need to pass the last 3 entered values (d,c,b) to another form. My plan was to get the txt.name of the last entered textbox (the textboxes are in order). Then I get the name and subtract 1 and the result is the name of the variable that I need to get the .Text value of.
I can get the txt.name, I can get the new name of the field I need to look up, but I cannot pass this string to the control to get the control.text value.
Maybe I am going about this the wrong way..any comments would be great.
thanks
Anne
-
Feb 1st, 2006, 04:02 PM
#2
Hyperactive Member
Re: populating the control name from a variable
To reference a control by name, use the form's Controls array:
Form1.Controls(NameOfControl).Text
-
Feb 1st, 2006, 04:34 PM
#3
Thread Starter
Junior Member
Re: populating the control name from a variable
Bpd, its so easy when you know...thanks a million
Anne
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|