L
laavista
I'd REALLY appreciate help. I need to determine how many records are in a
table. The table is called t_Credits. The code I tried to use returns "1"
as the number of records (and there are 5 records right now).
Dim db As Database
Dim rstTCredits As DAO.Recordset
Dim longNumRecords As Long
Public Sub AddToCreditsUsed()
Set db = CurrentDb
Set rstTCredits = db.OpenRecordset("t_Credits", dbOpenDynaset)
longNumRecords = rstTCredits.RecordCount
MsgBox longNumRecords & " records in table TCredits."
table. The table is called t_Credits. The code I tried to use returns "1"
as the number of records (and there are 5 records right now).
Dim db As Database
Dim rstTCredits As DAO.Recordset
Dim longNumRecords As Long
Public Sub AddToCreditsUsed()
Set db = CurrentDb
Set rstTCredits = db.OpenRecordset("t_Credits", dbOpenDynaset)
longNumRecords = rstTCredits.RecordCount
MsgBox longNumRecords & " records in table TCredits."