ACC: How to Use the Parent Property of a SubformID: Q100025
|
Novice: Requires knowledge of the user interface on single-user computers.
This article describes how to use a subform's Parent property to return the
name of its parent form.
The following is the correct syntax for the Parent property in macro
actions called from a subform:
Forms![Main Form Name]![Subform ControlName].Form.Parent.Name
-or-
Form.Parent.Name
-or-
Parent.Name
Macro: Get Parent Name
---------------------------------------------------------------
Action: MsgBox
Message: =Forms!Orders![Orders Subform].Form.Parent.Name
Title: Parent Form Name
Object: Text Box
--------------------------------------------------------------
ControlName: ProductID (or Product ID in versions 1.x and 2.0)
OnDblClick: Get Parent Name
Additional query words: main mainform sub
Keywords : kbusage FmsSubf
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 24, 1999