From: Barry Edmund Wright on 13 Aug 2010 10:15 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 13 Aug 2010 10:38 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 13 Aug 2010 11:48 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")
|
Pages: 1 Prev: Database Reference info via VBA Next: MSACCESS.EXE Hung Process |