RecordCount property (DataMap)

Returns the total number of records mapped with the specified data map settings. Read-only Long.

Applies to

Objects: DataMap

Syntax

object.RecordCount

Parameters

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

Remarks

If the IsGeographyForEveryZoomLevel property is True for the DataMap object, then the current zoom level also affects the count returned by the RecordCount property. For example, if data for the United States is currently shown at the state level, this property may return 51 (the number of areas mapped at the state level). If the user zooms in and data is shown at the county level, then this property may return 3,139 (the number of areas mapped at the county level).

If multiple fields are mapped, such as for Chart maps, the RecordCount property returns a count of all fields. For example, the number of United States counties mapped may return 9,417 for a Chart map with 3 fields.

To return the total number of values mapped, use the ValueCount property of the DataRange object.

Example

    Sub GetMatchedCount()
    Dim objApp As New MapPoint.Application
    Dim objDM As MapPoint.DataMap
    objApp.Visible = True
    objApp.UserControl = True

    Set objDM = objApp.OpenMap(objApp.Path & "\Samples\Sales.ptm").DataSets("Sales").DataMap
    'Check the record count of the data map     MsgBox Str(objDM.RecordCount)   End Sub