Just for interest, here's a variation which uses ADO only (i.e. not
ADOX) and means you don't have to parse the table names to identify
for system tables:
Sub odwDBTables()
Dim oConn As Object
Dim oRS As Object
Dim sConnString As String
Dim sFileName As String
sFileName = "D:\Development\vb\hospital db\TBIcontacts.mdb"
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sFileName & ";"
Set oConn = CreateObject("ADODB.Connection")
On Error Resume Next
oConn.Open sConnString
If Err.Number <> 0 Then
MsgBox "Error reading file " & sFileName
Else
On Error GoTo 0
Set oRS = oConn.OpenSchema(adSchemaTables, _
Array(Empty, Empty, Empty, "Table"))
Do While Not oRS.EOF
Debug.Print oRS!TABLE_NAME.Value
oRS.MoveNext
Loop
End If
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
End Sub
--