I have a SQL returing distinct values. I need to know the total rows of the recordset.
How is this possible without iterate through the recordset and having a counter?
I tried the following code but it keeps giving me recordcoutn of -1
SQLquery="SELECT DISTINCT Elective FROM tblStudents"
DbrecordSet.Open SQLquery, Dbconnection, 2 , 3
DbrecordSet.moveLast
TotalUnits = DbrecordSet.recordcount
How is this possible without iterate through the recordset and having a counter?
I tried the following code but it keeps giving me recordcoutn of -1
SQLquery="SELECT DISTINCT Elective FROM tblStudents"
DbrecordSet.Open SQLquery, Dbconnection, 2 , 3
DbrecordSet.moveLast
TotalUnits = DbrecordSet.recordcount