Problem: DoZoomToFeatures limits the Records only to those satisfying the criteria
With ActiveX Connector, you can use DoZoomToFeatures function of Map object to zoom to the features you are interested in. However, this function also limits the Recordset of the active layer to only those records that satisfy the criteria specified in the function.
For example, the code:
will make the map zoom to the area that contains Oregon and California. It also results in the recordset: statelayer.Recordset to contain just 2 records, 1 for Oregon and California each.
The WHERE expression passed to the DoZoomToFeatures function acts as a filter for the given Layer. Hence, only those features which satisfy the expression will be included in the Recordset.
Solution or Workaround
Set the Recordset's filter to nil ("") as shown below if you need to retain all features in the Recordset.
statelayer.Recordset.Filter.WhereExpression = ""