Hi,
You can use DAO to get the number of records and the number of records will correpond to the last record in the table.
Private Sub GetRecordNumber_Click()
Dim db as DAO>Database
Dim rs as DAO.Recordset
Set db= CurrentDB
Set rs= db.OpenRecordset("YourTableName",dbOpenDynaset)
If rs.RecordCount > 0 then
rs.MoveLast
rs.MoveFirst
MsgBox "There are " & rs.RecordCount & " records."
Else
MsgBox "Table contains no records"
End IF
rs.CLose
db.Close
Set rs=Nothing
Set db=Nothing
End Sub Hope it helps. Let me know what happens.
With regards,
PGK