RecordCount

  • Thread starter Thread starter Svein Engebretsen
  • Start date Start date
S

Svein Engebretsen

I'm trying to read the number of record on an open recordset. The value
returned is -1, although there are four record in the set.

Whats happening?

Svein
 
The -1 is actually a boolean False result that indicates that you have opened
the recordset with a keyset that does not measure the recordcount. For
example, using OpenKeyset does count records but ForwardOnly does not.

TomU
 
if rs is your recordset object:

rs.movelast
rs.movefirst

That will enforce that rs.recordcount is valued correctly.

Reggie
 
Back
Top