Sub GetRecordCounts()
Dim db As DAO.Database
Dim objtblDef As DAO.TableDef
Dim varCount As Variant
Set db = CurrentDb()
For Each objtblDef In db.TableDefs
If objtblDef.Connect <> "" Then
varCount = DCount("*", objtblDef.Name)
If varCount > 0 Then
Debug.Print objtblDef.Name, varCount
End If
End If
Next
Set objtblDef = Nothing
Set db = Nothing
End Sub
|