J
Jason Gyetko
I need to populate a text box of a variable form and variable field. I have
the following bit of code which I thought would work, but 'myform' is being
recognized as a string instead of a form or textbox. How can I build the
path to a form and textbox.value so I can set it accordingly? Any
suggestions would be greatly appreciated. Thanks.
Public Sub PopulateTextBox(FormName, FormFieldName)
Dim myform
myform = "Forms!" & FormName & "!" & FormFieldName
myform = "Display in Text Box"
End Sub
If I just use this hardcoded line, it works fine:
Forms!anyform!anytextbox.Value = "Display in Text Box"
the following bit of code which I thought would work, but 'myform' is being
recognized as a string instead of a form or textbox. How can I build the
path to a form and textbox.value so I can set it accordingly? Any
suggestions would be greatly appreciated. Thanks.
Public Sub PopulateTextBox(FormName, FormFieldName)
Dim myform
myform = "Forms!" & FormName & "!" & FormFieldName
myform = "Display in Text Box"
End Sub
If I just use this hardcoded line, it works fine:
Forms!anyform!anytextbox.Value = "Display in Text Box"