Counting the Number of records in a record set

JBurlison

Registered User.
Local time
Yesterday, 23:05
Joined
Mar 14, 2008
Messages
172
This only returns "1" but there are 11 how do i count them all?
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
DoCmd.GoToRecord , , acNewRec

Set db = CurrentDb
Set rs = db.OpenRecordset("RMA", dbOpenDynaset)

With rs
    CurrentNumber = .RecordCount
End With

rs.Close
 
Code:
With rs
    .MoveLast
    .MoveFirst
    CurrentNumber = .RecordCount
End With
 
HA! you the man bob!
 
GladWeCouldHelp.png
 

Users who are viewing this thread

Back
Top Bottom