Article ID: 209539 - View products that this article applies to.
This article was previously published under Q209539
Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
This article describes how to use a subform's Parent property to return the name of its parent form.
The Parent property of a control refers to the control's Parent object. In the example below, we use the Parent property of a subform to determine the name of the main form.
The correct syntax for the Parent property in macro actions called from a subform is:
Forms![Main Form Name]![Subform ControlName].Form.Parent.NameThis expression can be simplified when we consider that the Form property is the default property for the subform control. The simplified form of the above expression then becomes:
Parent.NameThe following example demonstrates how to use the Parent property in a macro:
For more information about the Parent property, click Microsoft Access Help on the Help menu, type parent property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.