Counting number of records returned by SQL.

M

Mike O'Brien

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top