I found code you would have to modify:
Code:
'---------------------------------------------------------------------------------------
' Procedure : RecordCountRemoteTables
' DateTime : 1/29/2008
' Author : Patrick Wood http://gainingaccess.net
' Purpose : Count and list all table names and each table's recordcount in remote DB
' Arguments : DBPath--A string that is the full path and name of a remote Database
' Example : RecordCountRemoteTables("C:\MyDatabases\MyDatabase.mdb")
' Usage : You are welcome to use and modify this code
' : if you leave this header intact.
'---------------------------------------------------------------------------------------
'
Sub RecordCountRemoteTables(DbPath As String)
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Dim rct As Long
Dim intcount As Integer
intcount = 0
Set dbs = OpenDatabase(DbPath)
Debug.Print Now()
Debug.Print dbs.Name
Debug.Print "Count | TableName | RecordCount"
Debug.Print "-------------------------------"
For Each tdf In dbs.TableDefs
rct = tdf.RecordCount
intcount = intcount + 1
Debug.Print intcount & " " & tdf.Name & " " & rct
Next tdf
Set tdf = Nothing
Set dbs = Nothing
End Sub
Depending on the number of table, you could write the table names to a combo box value list or a temp table and use the temp table (query) as the row source.
The site is http://gainingaccess.net/GainingAcce...esDocument.htm