I have a form with a tab control and multiple page controls. Each page has at least one subform on it. Subform data originates from a query based on it's own table or directly from the table.
All tables are in a one to many relationsip with the table that uses page one and it's subform.
From a Command Button Located on the active page of the "Main Form" (ie each page will have one) I would like to capture in a variables:
1. The name of the subform located on the activepage
2. The record source of said subform
I am having trouble referring to them in a generic sense (ie I don't want to code in the specific name of the subform} in order to get to subform.name
or subformName.recordsource
Screen.ActiveControl refers to the "Main Form" and I don't know how to get the subform to be the active control.
All tables are in a one to many relationsip with the table that uses page one and it's subform.
From a Command Button Located on the active page of the "Main Form" (ie each page will have one) I would like to capture in a variables:
1. The name of the subform located on the activepage
2. The record source of said subform
I am having trouble referring to them in a generic sense (ie I don't want to code in the specific name of the subform} in order to get to subform.name
or subformName.recordsource
Screen.ActiveControl refers to the "Main Form" and I don't know how to get the subform to be the active control.