Is there a way that I can display the record count in a certain query on a main form page?
I have a main page that I use to navigate among query results, forms, and reports, and, from that form, I would like to display how many records are in each query.
I used to code the RecordCount as NabiLikeDavid, but came upon an easier way, should you be interested:
Dim dbs as Database
Dim rst as RecordSet
Dim MyQuerysRecordCount as Long
Set dbs = CurrentDb
Set rst = dbs.QueryDefs("MyQuery".OpenRecordSet
rst.moveLast
rst.moveFirst
MyQuerysRecordCount = rst.RecordCount
rst.Close
See, once the recordset is populated, DAO has a way of just giving you the record count.
Roy
aka BanditWk
Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)
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.