From: Barry Edmund Wright on
Hi All,

My tables are linked to a Backend called DMS.mdb in:
S:\General\Databases\DMS\DMS.mdb

Could someone give me a function which would return the full path to
the backend, including of not including the db name:

msgbox "Location of Backend: " & FunctionName

Thanks,
Barry
From: Salad on
Barry Edmund Wright wrote:

> Hi All,
>
> My tables are linked to a Backend called DMS.mdb in:
> S:\General\Databases\DMS\DMS.mdb
>
> Could someone give me a function which would return the full path to
> the backend, including of not including the db name:
>
> msgbox "Location of Backend: " & FunctionName
>
> Thanks,
> Barry

This returns the full path of a linked table else null.

Public Function GetBEName(strTable) As Variant
GetBEName = DLookup("Database", "MSysObjects", "Name='" & strTable &
"' And Type=6")
End Function

msgbox GetBEName("YourTableName")
From: Barry Edmund Wright on
Thanks Salad, exactly what I wanted.
Cheers,
Barry

On Aug 13, 10:38 am, Salad <sa...(a)oilandvinegar.com> wrote:
> Barry Edmund Wright wrote:
> > Hi All,
>
> > My tables are linked to a Backend called DMS.mdb in:
> > S:\General\Databases\DMS\DMS.mdb
>
> > Could someone give me a function which would return the full path to
> > the backend, including of not including the db name:
>
> > msgbox "Location of Backend: " & FunctionName
>
> > Thanks,
> > Barry
>
> This returns the full path of a linked table else null.
>
> Public Function GetBEName(strTable) As Variant
>     GetBEName = DLookup("Database", "MSysObjects", "Name='" & strTable &
> "' And Type=6")
> End Function
>
> msgbox GetBEName("YourTableName")