open the table
' Note this is for ADO recordset
Dim Conn2 As ADODB.Connection
Dim Rs1 As ADODB.Recordset
Dim SQLCode as String
Set Conn2 = CurrentProject.Connection ' <<<<Note same as CurrentDb
Set Rs1 = New ADODB.Recordset
SQLCode = "SELECT * FROM [YourTable];"
Rs1.Open SQLCode, Conn2, adOpenStatic, adLockOptimistic
Rs1.movelast
Rs1.movefirst
debug.print Rs1.recordcount 'this is the total number of records
' close it this way
Set rs1 = nothing
Set Conn2 = nothing
DougP, MCP