Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("ELUR1")
intNumbRows = rst.RecordCount
/Code
intNumbRows contains one less than the actual number of rows in the table. What am I doing wrong?
tia
I stopped using the RecordCount property years ago because I couldn't keep track of the different ways you had to use it depending on database type, cursor type, cursor location, etc. If I need a count of records I simply do a:
SELECT COUNT(*) FROM Table
or similar, or DCount. I just find that pure SQL is 100% reliable as compared to some of the ADO properties.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.