If you are referring to the linked or attached TABLES in Access, you can pull that out of the tables collection using VBA. To run my sample code, First create a table called "TableLinks" with text columns called Name and Connect. Then paste this code into a module and run it:
Public Sub LoadTableLinks()
Dim db As Database, rs As Recordset, x As Integer
Set db = CurrentDb()
Set rs = db.OpenRecordset("TableLinks", dbOpenDynaset)
For x = 0 To db.TableDefs.Count - 1
'exclude system tables
If Left(db.TableDefs(x).Name, 4) = "MSys" Then
GoTo Next_X
End If
'exclude tables that are not attached tables
If db.TableDefs(x).Connect = "" Or IsNull(db.TableDefs(x).Connect) Then
GoTo Next_X
End If
rs.AddNew
rs![TableName] = db.TableDefs(x).Name
rs![Connection] = db.TableDefs(x).Connect
rs.Update
Next_X:
Next x
End Sub
Last Wiki Answer Submitted: November 19, 2008 8:23 pm by Randym1,740 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.