Location of linked database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In VBA how can I find the location of the linked database (there is only one
linked database)?

My VBA knowledge is not huge.

Thanks in advance.
 
The 'Connect' property of a linked Access table returns a string such as ...

;DATABASE=C:\BJDATA\BJECDT02.MDB

To get the path and name of the database that contains the source table,
take everything to the right of the "=" sign ...

? Mid$(CurrentDb.TableDefs("tblActions").Connect, InStr(1,
CurrentDb.TableDefs("tblActions").Connect,"=")+1)
C:\BJDATA\BJECDT02.MDB
 
Back
Top