dschlieder
Well Known Member
From access 97 help on the recordcount property:
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.
You are probably retrieving records - however the code you have here isn't doing anything - try changing that msgbox to return the first field of the table
You're going to need some code like:
' while we haven't attempted to go past the last record
While Not rs.EOF
your processing goes here
' move to the next record
rs.MoveNext
Wend
' cleanup code here...
You can count the record manually during this loop or change the recordset property.
Dave
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.
You are probably retrieving records - however the code you have here isn't doing anything - try changing that msgbox to return the first field of the table
You're going to need some code like:
' while we haven't attempted to go past the last record
While Not rs.EOF
your processing goes here
' move to the next record
rs.MoveNext
Wend
' cleanup code here...
You can count the record manually during this loop or change the recordset property.
Dave