How do you get linked table property using VBA

  • Thread starter Thread starter kiloez
  • Start date Start date
K

kiloez

I'd like to use code to iterate through the tables collection in an Access
2003 DB and be able to identify linked tables. What method should I use?
 
Dim dbCurr As DAO.Database
Dim tdfCurr As DAO.TableDef

Set dbCurr = CurrentDb()
For Each tdfCurr In dbCurr.TableDefs
If Len(tdfCurr.Connect) > 0 Then
Debug.Print tdfCurr.name
End If
Next tdfCurr
Set dbCurr = Nothing

Alternatively, run the following query:

SELECT Name
FROM MSysObjects
WHERE Type = 6
ORDER BY Name
 
Back
Top