Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to do this?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00262894
Message ID:
00262902
Views:
18
>I have some textboxes on a form.
>
>To fill them I do as follows:
>THISFORM.txtBox1.Value = && some variable or value goes here
>THISFORM.txtBox2.Value = && some variable or value goes here
>THISFORM.txtBox3.Value = && some variable or value goes here
>THISFORM.txtBox4.Value = && some variable or value goes here
>
>Can I do a set of commands like this instead? And what would the syntax be? The following example does not have valid syntax, but I think you see what I am trying to do:
>FOR i = 1 to 4
> THISFORM.txtBox(i).Value =
>ENDFOR
>
>Thanks for the help.
>
>All the best,
>Steve Kramer

Steve, look at SetAll() method.

thisform.SetAll("Value", 789, "textbox")

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform