I define a DAO recordset and shows up in "locals" window and when I hover over its fields lower in the code it has values as exoected, but if I want to count the records, I get an error message as below. What is wrong?
I want to count the total number of records in the recordset. (Stops are there for debugging.)
Set rstIncomes = db.OpenRecordset(rstIncomesSQL, dbOpenSnapshot)
If DCount("*", "rstIncomes") = 0 Then
MsgBox "rstIncomes has No records to show"
MsgBox "rstIncomes has " & DCount("*", "rstIncomes") & "records."