Dear friends,
I need to refer to a value in a text box which belongs to a subform from
another form (not the parent form).
Can anyone help me?
Thanks
Catalin
Try this:
Forms![NameOfYourMainForm]![NameOfYourSubForm].Form!
[NameOfControl].visible = true
The line above will make the referenced control visible.
Until you get the syntax down, here is a method that might help you to
get the statement correct.
Open a new query.
Place your cursor in the Criteria of any column.
Right click and select the "Build" option.
Use the options in the "Builder" to specify the form, the subform and
the control (you can in most cases even include the property you want
to modify) and paste your selections into the builder's text box.
Copy the entry to the clipboard.
Close the Builder and the new query.
Paste the line of code into your VBA code.
HTH
Mr B