Getting path of linked tables mdb

J

John J.

From the frontedn, is there vba code to determine to which backend.mdb the
tables are linked?

Thank you
John
 
J

John J.

Found it:

Public Function pfGetBEPath() As String
Dim table As DAO.TableDef
Dim db As DAO.Database
Dim connstr As String
Set db = CurrentDb
Set table = db.TableDefs("OneOfYourLinkedTables")
connstr = table.Connect
pfGetBEPath = Right(table.Connect, Len(table.Connect) - (InStr(1,
table.Connect, "DATABASE=") + 8))
Set table = Nothing
Set db = Nothing
End Function
 
Top