How to find the path of data files in a split database

G

GL

Hi,

Is there a property that gives the path where the data files are located in
a split database as the Currentproject.Path gives the path of the application?

Thanks
GL
 
R

Rick Brandt

GL said:
Hi,

Is there a property that gives the path where the data files are located in
a split database as the Currentproject.Path gives the path of the application?

The Connect property of any linked table.

CurrentDB.TableDefs("TableName").Connect
 
A

Albert D. Kallal

I used the follwing:

Function strBackEnd() As String

Dim mytables As TableDef

Dim strTempBack As String
Dim strFullPath As String
strFullPath = ""

For Each mytables In CurrentDb.TableDefs
If Left(mytables.Connect, 10) = ";DATABASE=" Then
strFullPath = Mid(mytables.Connect, 11)
Exit For
End If
Next mytables

strBackEnd = strFullPath

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

Top