T
tommylux
I am a little new on Google Groups but decided to use it as I have
looked at it so many times.
Dim db As DAO.Database
Dim NewStaff As DAO.Recordset
Set db = CurrentDb()
Set NewStaff = db.OpenRecordset("Staff") 'This is a query
'X
MsgBox NewStaff.RecordCount
NewStaff.Close
Should this code be based on a table, It would seem that Staff.MoveLast
is not needed. Is this correct?
As it is based on a query, is recordcount the current record or is it
the total? If it is the total, could I use Movelast then Move first
before running recordcount?
Is there a better way to count the number of records in a table?
Tom
looked at it so many times.
at 'X for it to give me the correct amount.From research, I have found out that a "Staff.MoveLast" must be placed
Dim db As DAO.Database
Dim NewStaff As DAO.Recordset
Set db = CurrentDb()
Set NewStaff = db.OpenRecordset("Staff") 'This is a query
'X
MsgBox NewStaff.RecordCount
NewStaff.Close
Should this code be based on a table, It would seem that Staff.MoveLast
is not needed. Is this correct?
As it is based on a query, is recordcount the current record or is it
the total? If it is the total, could I use Movelast then Move first
before running recordcount?
Is there a better way to count the number of records in a table?
Tom