RecordCount

  • Thread starter Svein Engebretsen
  • 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
 
T

TomU

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
 
R

Reggie Laffond

if rs is your recordset object:

rs.movelast
rs.movefirst

That will enforce that rs.recordcount is valued correctly.

Reggie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top