S
Scott
I wanted to use the following code in order to get the number of records in
a recordset.
Table called "Customers" have 25 records in there, but when I type in the
Immediate window the following:
GetRstRecordCount
I get the following:
1
How could this be. ?
I know that I can look at the table itself to get the number of records in
that table, but I first experienced this problem when I entered a criteria,
so I tried without any criteria, just the table, but the same happens.
Code start
**************************************************
Sub GetRstRecordCount()
Dim rstCustSub As DAO.Recordset
Set rstCustSub = CurrentDb.OpenRecordset("Customers")
Debug.Print rstCustSub.RecordCount
End Sub
*****************************************************
Code end
Thanks,
Scott
a recordset.
Table called "Customers" have 25 records in there, but when I type in the
Immediate window the following:
GetRstRecordCount
I get the following:
1
How could this be. ?
I know that I can look at the table itself to get the number of records in
that table, but I first experienced this problem when I entered a criteria,
so I tried without any criteria, just the table, but the same happens.
Code start
**************************************************
Sub GetRstRecordCount()
Dim rstCustSub As DAO.Recordset
Set rstCustSub = CurrentDb.OpenRecordset("Customers")
Debug.Print rstCustSub.RecordCount
End Sub
*****************************************************
Code end
Thanks,
Scott