What is the number of records returned 1?

In my MS Access database, I run a query in VB that should return two records. When I run it in SQL, I get two records, but when I start from VBA, I get two. Here is the code in the SQL view that gets two records:

SELECT *
FROM tblWebMeetingData
WHERE [Last Name] LIKE 'Marx';

And when I call it in VBA like this:

SQL = "SELECT * FROM tblWebMeetingData WHERE [Last Name] LIKE 'Marx';"
Set rst = CurrentDb.OpenRecordset(SQL)  
MsgBox ("Number of records: " & rst.RecordCount)

I get one record for the number of records. Is a counting counter considered to account for all records returned from an SQL statement or table? What am I doing wrong here?

thank

+5
source share
1 answer

DAO , ( ). rst.MoveLast rst.RecordCOunt.

+14

All Articles