
Counting tables BUT not system tables
Dave,
Public Function fCountTables() As Integer
Dim db As Database
Dim tdf As TableDef
Dim i As Integer
Set db = CurrentDb
i = 0
For Each tdf In db.TableDefs
If tdf.Attributes And dbSystemObject Or _
tdf.Attributes And dbHiddenObject Then
'Ignore
Else
i = i + 1
End If
Next
Set db = Nothing
fCountTables = i
End Function
Hope this helps,
James
Quote:
> Hello,
> Can anyone tell me how to count the number of tables in a
> DB, but that number should NOT include the system/hidden
> tables??
> Thanks for any help.
> Dave