R
Rli
Hi all,
I have a problem using the forms collection in vb.
I have statement like this
myvalue = Forms(str1).Controls(str2).Value
where str1 is a formname of a loaded form and str2 is the name of a control
on that form.
Let say
str1 = "Myform"
str2 = "Mycontrol"
after executing it Myvalue is correctly retrieved from the form.
But now my problem:
when str1 holds the name of a subform Forms(str1) fails because the subform
is not in the forms collection.
Does anyone know how to access the subform?
Thanks for any help
I have a problem using the forms collection in vb.
I have statement like this
myvalue = Forms(str1).Controls(str2).Value
where str1 is a formname of a loaded form and str2 is the name of a control
on that form.
Let say
str1 = "Myform"
str2 = "Mycontrol"
after executing it Myvalue is correctly retrieved from the form.
But now my problem:
when str1 holds the name of a subform Forms(str1) fails because the subform
is not in the forms collection.
Does anyone know how to access the subform?
Thanks for any help