Any way to access path a table is linked to?

  • Thread starter Thread starter Amir
  • Start date Start date
A

Amir

go to Tools -> Add-Ins ->Linked Table Manager
-----Original Message-----
Is it possible to obtain the path that a table is linked
to in the back end? How would I do this? Is it a
property of the table?
 
Is it possible to obtain the path that a table is linked
to in the back end? How would I do this? Is it a
property of the table?


It's contained in the table's TableDef.Connect property

strConnect = CurrentDb.TableDefs!nameoftable.Connect

If the table it's linked to is in a Jet (Access) MDB file,
then the path statrs in the 11th character:

strPath = Mid(strConnect, 11)

If it's a different database engine then parse it out using
the InStr function. It's be right after Database= and
before the next semicolon.
 
Back
Top