GeographicFieldType property

Returns the GeoFieldType for the specified Field object. If the field is data and does not contain geocoding information, or if the DataSet object has a HowCreated property of geoDataSetDemographic, returns geoFieldData. If the field was skipped during importing or linking, returns geoFieldSkipped. See the GeoFieldType values topic for values and their description. Read-only GeoFieldType.

Applies to

Objects:  Field

Syntax

object.GeographicFieldType

Parameters

Part Description
object Required. An expression that returns a Field object.

Example

  
    Sub FindGeographicTypeOfFirstField()
  Dim objApp As New MapPoint.Application
  Dim objDataSet As MapPoint.DataSet
  objApp.Visible = True
  objApp.UserControl = True

  Set objDataSet = objApp.OpenMap(objApp.Path & "\Samples\Sales.ptm").DataSets(1)

  'Test the geographical information of the first field
  With objDataSet.Fields(1)
    Select Case .GeographicFieldType
      Case geoFieldData
        MsgBox "The field is a data field, not a geographic field."
      Case geoFieldAddress1
        MsgBox "The field type for this field is Address1."
      Case geoFieldAddress2
        MsgBox "The field type for this field is Address2."
      Case geoFieldAddress3
        MsgBox "The field type for this field is Address3."
      Case Else
        MsgBox "The field a non-address geographic field."
    End Select
  End With
End Sub