Getting path of linked tables mdb

  • Thread starter Thread starter John J.
  • Start date Start date
J

John J.

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

Thank you
John
 
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
 

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

Back
Top