IsMatched property

MapPoint North America 2006 SDK

Returns whether the current record is matched to the map. Read-only Boolean.

Applies to

Objects:  Recordset

Syntax

object.IsMatched

Parameters

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

Remarks

To return how the specified record was matched to the map, use the MatchingMethod property of the Recordset object.

Example

 Sub GetTotalSales()

    Dim objApp As New MapPoint.Application
    Dim objRS As MapPoint.Recordset
    objApp.Visible = True
    objApp.UserControl = True

    'Query to obtain all records in the record set
    Set objRS = objApp.OpenMap(objApp.Path & "\Samples\Sales.ptm").DataSets("SampleData").QueryAllRecords

    'Add sales values for all matched records (to get the total sales)
    Dim iTotal As Double
    Do Until objRS.EOF
      If objRS.IsMatched Then
        iTotal = iTotal + objRS.Fields("Our Sales ($)").Value
      End If
      objRS.MoveNext
    Loop

    'Output total sales
    MsgBox "Total sales: $" + CStr(iTotal)

  End Sub
Show: