Autosearch function

sparx

Morphed Human
Local time
Today, 10:21
Joined
Jul 22, 2002
Messages
80
I need to find a way to search through all our existing databases and retrieve all the links. I need to know what database has linked tables in it, and where these links point to.

Any help would be greatly appreciated.

Thanks,

Erik
 
Heres part of the solution - code below will give you the linked tables in a db and where they point.

Public Sub CheckLinks()
Dim db As Database
Dim i As Integer
Set db = DBEngine.Workspaces(0).Databases(0)
db.TableDefs.Refresh
Echo False
For i = 0 To db.TableDefs.Count - 1
If db.TableDefs(i).Connect = "" Then
Else
Debug.Print db.TableDefs(i).Name
Debug.Print db.TableDefs(i).SourceTableName
End If
Next i
Set db = Nothing
End Sub
 

Users who are viewing this thread

Back
Top Bottom