Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RecordCount

Status
Not open for further replies.

Crookshanks

Technical User
May 18, 2004
296
NL
Goodmorning,

I am using DAO 3.60 in my application. Now I want to count te records in en linked table.

set rs = dbOpenRecordset("tbl_Remote")
debug.print rs.recordcount

Gives 1 instead of the real number of records, does the system open the linked table as a dynaset? When I want to count the numer of records in a query based on linked tables I meet the same problem. Can anyone please explain this to me, should be rather simple.

Thanks in advance,


 
See the helpfiles on recordcount, it states the recordset must be fully populated before showing the accurate count (all records) - use a .movelast to do so. For a remote table, with lot of recods, you might experiement with fetching the count thur opening a recordset baseed on a count (see which method is faster):

[tt]set rs=db.openrecordset("select count(*) from tbl_Remote")
debug.print rs.fields(0).value[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top