Hi Moises,
Suppose, we want to change text1 value to 'bbbbbb' and the textbox name 'text1' is in a variable TextBoxToChange.
Here is how we do it without macro
store 'bbbbbb' to ('thisform.' + TextBoxToChange + ".value") && this is the simplest way if we only need to assign something
We're using name expression here.
We can also do it this way:
loTextBox = evaluate('thisform.' + TextBoxToChange)
loTextBox.value = 'bbbbbb'
loTextBox.RunSomeMethod()
There is almost no need for any macros to do object manipulations.
>Naomi
>
>I kept the & because I need a variable to be a member of a form
>
>
>thisform.text1.value= "aaaa"
>
>store "text2" to my myText
>
>thisform.&mytext.value = "aaaa" && does not work
>
>then:
>
>store "thisform." + Mytext + ".value" to txtBox
>
>&txtBox = "aaaa" && now works
>
>
>How would you remove the & from it ?
store 'aaaaa' to ('thisform.' + myText + ".value")
If it's not broken, fix it until it is.
My Blog