I need to access a form control from a procedure. For example, I have the form "Client" and the control "Name" then I can fill the form control like this:
Call FillForm ("Client")
Sub FillForm (FormName As Variant)
Forms(FormName).name = "Test string"
This works fine. However I now need to fill in many different controls of the same form and hence would like to concatenate the control as follows:
Call FillForm ("Client","Name")
Sub FillForm (FormName,FormCtrl As Variant)
Forms(FormName).FormCtrl = "Test string"
Obviously this does not work. Is there a way how i can reference the control from a function (i cannot use me.controls...
Thank you MIchael