Im calling a query in access to display users registered for a certian course. I want it to list the users registered and show a count of how many users have registered for that course
----- Jim Buyens wrote: ----
-----Original Message----
How do I get a count of the number of records when
query is performed
If you're using an ADO recordset, the RecordCount
property may contain the information you're looking for
Set rsMine = New ADODB.Recordse
sql = "select * from mytable
rsMine.Open sql, strCnx
NrOfRecs = rsMine.RecordCoun
However, for some cursor types and cursor locations, this
property may always be zero. If you encounter this, try a
different cursor type or cursor location, such a
rsMine.CursorLocation = adUseClien
rsMine.Open sql, strCnxnm, adOpenStati
Jim Buyen
Microsoft FrontPage MV
http://www.interlacken.co
Author of
*---------------------------------------------------
|\--------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Ou
||--------------------------------------------------
|| Web Database Development Step by Step .NET Editio
|| Microsoft FrontPage Version 2002 Inside Ou
|| Faster Smarter Beginning Programmin
|| (All from Microsoft Press
|/--------------------------------------------------
*---------------------------------------------------