Share via


Item property (Fields)

Returns a Field object based on its Name property or position within the specified Fields collection. Read-only.

Applies to

Collections:  Fields

Syntax

object.Item(Index)

Parameters

Part Description
object Required. An expression that returns a Fields collection.
Index Required Variant. The name of the field, or an integer representing the index number of the field within the collection.

Remarks

The Item property is the default property for the Fields collection.

Example

    Sub CreateShadedAreaMapUsingMapPointDemographics()
    Dim objApp As New MapPoint.Application
    Dim objDataSet As MapPoint.DataSet
    Dim objDataMap As MapPoint.DataMap
    Dim objField As MapPoint.Field

    'Set up application and objects to use     objApp.Visible = True     objApp.UserControl = True     Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics()     Set objField = objDataSet.Fields.Item("Households (1980)")     'Create the data map and give it a name     Set objDataMap = _       objDataSet.DisplayDataMap(geoDataMapTypeShadedArea, _       objField, geoShowByRegion1, geoCombineByDefault, _       geoRangeTypeDiscreteEqualRanges, geoRangeOrderDefault, 15)     objDataMap.LegendTitle = "State Households"   End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.