Returns a reference to the form that contains the page.
Read-only property
Set variable = object.Parent |
Use the Parent property to get access to other pages in the same form without having to use their fully qualified paths. For example, a form named "frmMyForm" has two pages: "pgPage1" and "pgPage2". The code below uses the fully qualified path to access each page:
Dim objPg1, objPg2
Set objPg1 = Map.Layers("MyLayer.shp").Forms("frmMyForm").Pages("pgPage1")
Set objPg2 = Map.Layers("MyLayer.shp").Forms("frmMyForm").Pages("pgPage2")
By using Parent, the code can be shortened to:
Dim objPg1, objPg2
Set objPg1 = Map.Layers("MyLayer.shp").Forms("frmMyForm").Pages("pgPage1")
Set objPg2 = objPg1.Parent.Pages("pgPage1")
Dim objPg1, objPg2
Set objPg1 = Map.Layers("MyLayer.shp").Forms("frmMyForm").Pages("pgPage1")
Set objPg2 = Map.Layers("MyLayer.shp").Forms("frmMyForm").Pages("pgPage2")
By using Parent, the code can be shortened to:
Dim objPg1, objPg2
Set objPg1 = Map.Layers("MyLayer.shp").Forms("frmMyForm").Pages("pgPage1")
Set objPg2 = objPg1.Parent.Pages("pgPage1")