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
 

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