How do you get linked table property using VBA

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?
 
D

Douglas J. Steele

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top