Хелпы читать умеем?
Цитата | Use the RecordCount property to find out how many records in a Recordset or TableDef object have been accessed. The RecordCount property doesn't indicate how many records are contained in a dynaset-, snapshot-, or forward-only–type Recordset object until all records have been accessed. Once the last record has been accessed, the RecordCount property indicates the total number of undeleted records in the Recordset or TableDef object. To force the last record to be accessed, use the MoveLast method on the Recordset object. You can also use an SQL Count function to determine the approximate number of records your query will return. |
так что
Код | z = "select copies.* from copies where itemid=" + Str(i) Data1.RecordSource = z Data1.Refresh Debug.Print z Set rs2 = Data1.Recordset rs2.MoveLast '!!!!!!!!!!!!!!!!!!!!!! Debug.Print rs2.RecordCount
| |