Share via


MatchingMethod property

Returns how the specified data set or record was matched to the map. The IsMatched property for the Recordset object must be True. See the GeoMatchingMethod values topic for values and their descriptions. Read-only GeoMatchingMethod.

Applies to

Objects: DataSet, Recordset

Syntax

object.MatchingMethod

Parameters

Part

Description

object

Required. An expression that returns a DataSet or Recordset object.

Example

  Sub GetInfoAboutFirstRecord()
    Dim objApp As New MapPoint.Application
    Dim objDataSet As MapPoint.DataSet
    Dim objRecords As MapPoint.Recordset

    'Set up application and objects to use
    objApp.Visible = True
    objApp.UserControl = True

    'Let user create a data map
    Set objDataSet = _
      objApp.ActiveMap.DataSets.ShowImportWizard

    'Get information about the first record
    Set objRecords = objDataSet.QueryAllRecords
    objRecords.MoveFirst
    If objRecords.IsMatched Then
      Select Case objRecords.MatchingMethod
        Case geoByCensus1
          MsgBox "Record matched to Census 1 area."
        Case geoByCensus2
          MsgBox "Record matched to Census 2 area."
        Case geoByCity
          MsgBox "Record matched to City."
        Case geoByCountry
          MsgBox "Record matched to Country."
        Case geoByFindAddress
          MsgBox "Record matched to address."
        Case geoByHand
          MsgBox "Record matched by hand."
        Case geoByLatLong
          MsgBox "Record matched to Latitude and Longitude."
        Case geoByOSGridRef
          MsgBox "Record matched to Ordnance Survey Grid Reference."
        Case geoByOtherCity
          MsgBox "Record matched to Second City."
        Case geoByPostal1
          MsgBox "Record matched to Postal 1 area."
        Case geoByPostal2
          MsgBox "Record matched to Postal 2 area."
        Case geoByPostal3
          MsgBox "Record matched to Postal 3 area."
        Case geoByPostal4
          MsgBox "Record matched to Postal 4 area."
        Case geoByRegion1
          MsgBox "Record matched to Region 1 area."
        Case geoByRegion2
          MsgBox "Record matched to Region 2 area."
        Case geoByRegion3
          MsgBox "Record matched to Region 3 area."
        Case geoByStreetAddress
          MsgBox "Record matched to Street Address."
        Case geoByTerritory
          MsgBox "Record matched to custom territory."
      End Select
    Else
      MsgBox "First record was not matched."
    End If
  End Sub