I received help on determining the active page of a tab control, by having the following code included in a form module:
Property Get ActivePage() As Access.Page
'PROPERTY TO IDENTIFY WHICH TAB WE ARE ON, FOR FILTERING AND IDENTIFYING WHICH ACTIVE LISTBOX TO LOOK AT, FOR VALUES AND ACTIONS
Set ActivePage = .Pages(.Value)
Now I want to do something similar, but instead of a tab control page, I'm looking to capture the name of the source object, for a subform control. I switch out the source object, and based on that, I need to change the header stuff - title caption, combo visible or not, combo rowsource, etc.
This is what I tried:
Property Get WhichSub() As Access.SubForm
'PROPERTY TO IDENTIFY WHICH SUBFORM IS ACTIVE, FOR DETERMINING HEADER INFO AND BEHAVIOR
Set WhichSub = .SourceObject(.Name)
The .SourceObject is highlighted, when I attempt to compile, and I get an error that says "Wrong number of arguments or invalid property assignment".
Anyone know what I need to do, to get this to work? It will be helpful, in allowing me to write a simple select case, on that value, whenever I need in, during the operations on that form.