Path of back-end

G

George

Hi all,

In Acess XP, one can use Application.CurrentProject.Path
to determine the path of the front-end. Is there a similar
way to determine the path of the back-end?

TIA.
 
K

Ken Snell

I use a query that returns the name of the backend using a linked table
name:

SELECT MSysObjects.Database
FROM MSysObjects
WHERE (((MSysObjects.ForeignName) Like "NameOfALinkedTable"));
 
M

Marshall Barton

George said:
In Acess XP, one can use Application.CurrentProject.Path
to determine the path of the front-end. Is there a similar
way to determine the path of the back-end?

Which back end? Every linked table in the front end could
be in a different back end.

You can extract the path to a linked table's mdb file from
the linked table's Connect property:

Dim dbFE As Database
Dim tdf As TableDef
Dim strBEpath As String

Set dbFE = CurrentDb()
Set tdf = dbFE.TableDefs("nameoflinkedtable")
strBEpath = Mid(tdf.Connect, 11)
 

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

Top