Returns the specified Form object.
Set variable = object.Item ( Index ) |
- Index
- Required. A Variant that specifies the name or index of the form.
Index is a variant specifying the form to reference. It can be either the index or the name of the form. For example, if your map contains a form named "frmMyForm" that has an index of 2, the following two lines of code will yield the same result:
Set objForm = Map.Layers("MyLayer.shp").Forms.Item(2)
Set objForm = Map.Layers("MyLayer.shp").Forms.Item("frmMyForm")
The Item method is the default method for the Forms collection. Therefore, the following two lines of code will yield the same result:
Set objForm = Map.Layers("MyLayer.shp").Forms.Item("frmMyForm")
Set objForm = Map.Layers("MyLayer.shp").Forms("frmMyForm")
Set objForm = Map.Layers("MyLayer.shp").Forms.Item(2)
Set objForm = Map.Layers("MyLayer.shp").Forms.Item("frmMyForm")
The Item method is the default method for the Forms collection. Therefore, the following two lines of code will yield the same result:
Set objForm = Map.Layers("MyLayer.shp").Forms.Item("frmMyForm")
Set objForm = Map.Layers("MyLayer.shp").Forms("frmMyForm")