Recordcount

accessman2

Registered User.
Local time
Today, 15:05
Joined
Sep 15, 2005
Messages
335
Hi,
In MS Access table, I have a question,

I have a table "Hist", I open it and see the no. of records, it is 35149 records.

But, I write the VBA,
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Hist")

msgbox rs.recordcount

it shows 70298 records. Why the no of the records is different? What's wrong with it?
Please let me know, thanks.
 
According to ejstefl's page posted the recordcount is supposed to be better. so if you want to have it displayed in a msgbox just take aout the

Me.txtStaffCount.Value = rst.RecordCount

and replace it with

msgbox rst.recordcount

it works :) Hope that helps
 

Users who are viewing this thread

Back
Top Bottom