T
teqslamer
I have a search form with 2 subforms, one is the search criteria the
other is the results of the search. This all works really well that is
not my problem. the issue is that based upon the data being searched I
need to change the lables, record sources and control sources of the
objects in these two subforms. I am using VBA and have it working by
hard coding the changes to each object that needs changing I am looking
for the syntax to address the objects in the subforms via variables.
This way I can use a table to drive the formation of the subforms
lables, textboxes, combo boxes and their related data.
I can pass the form name to the function then using:
Dim frm As Form
Set frm = Forms(FormName)
How do I address the subforms in this manner?
Note: this code is in a module not within the form.
other is the results of the search. This all works really well that is
not my problem. the issue is that based upon the data being searched I
need to change the lables, record sources and control sources of the
objects in these two subforms. I am using VBA and have it working by
hard coding the changes to each object that needs changing I am looking
for the syntax to address the objects in the subforms via variables.
This way I can use a table to drive the formation of the subforms
lables, textboxes, combo boxes and their related data.
I can pass the form name to the function then using:
Dim frm As Form
Set frm = Forms(FormName)
How do I address the subforms in this manner?
Note: this code is in a module not within the form.