Try using the RecordCount property of your recordset after
the MoveLast method:
>strSQL = "Select values from table"
>set db = DBEngine.Workspaces(0).Databases(0)
>set rs = db.OpenRecordset(strSQL, DB_OPEN_DYNASET)
rs.MoveLast
Debug.Print rs.RecordCount
Mike.
>-----Original Message-----
>I am using code similar to the below to return a number
of
>rows from a table.
>
>strSQL = "Select values from table"
>set db = DBEngine.Workspaces(0).Databases(0)
>set rs = db.OpenRecordset(strSQL, DB_OPEN_DYNASET)
>
>Is there a way to find the number of rows returned
without
>having to do a "Select count(values)...." statement.
>
>Many thanks
>Ian Norris
>.
>
|