![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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") |
#4
| |||
| |||
|
|
Barry Edmund Wright wrote: 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") |
#5
| |||
| |||
|
|
Salad <salad (AT) oilandvinegar (DOT) com> wrote in news:uLmdndLzfoNgxfjRnZ2dnUVZ_t2dnZ2d (AT) earthlink (DOT) com: Barry Edmund Wright wrote: 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") Heavens, I always use: Mid(CurrentDB.TableDefs(strTable).Connect, 11) There's more than one way to skin a cat. |
#6
| |||
| |||
|
|
David W. Fenton wrote: Salad <salad (AT) oilandvinegar (DOT) com> wrote in news:uLmdndLzfoNgxfjRnZ2dnUVZ_t2dnZ2d (AT) earthlink (DOT) com: 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") Heavens, I always use: Mid(CurrentDB.TableDefs(strTable).Connect, 11) There's more than one way to skin a cat. ![]() |
#7
| |||
| |||
|
|
Salad <sa... (AT) oilandvinegar (DOT) com> wrote innews:dsidnd3SS5BjjvvRnZ2dnUVZ_s2dnZ2d (AT) earthlink (DOT) com: David W. Fenton wrote: Salad <sa... (AT) oilandvinegar (DOT) com> wrote in news:uLmdndLzfoNgxfjRnZ2dnUVZ_t2dnZ2d (AT) earthlink (DOT) com: 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") Heavens, I always use: * Mid(CurrentDB.TableDefs(strTable).Connect, 11) There's more than one way to skin a cat. ![]() What I meant was that I don't even have a function for this -- I just type in the Mid() statement as above. Actually, I do have a function for it, but don't use it any more. I do have something of a love affair with Mid() -- I use it all over the place for all sorts of things, particularly capitalizing on Null concatenation with the + operator. -- David W. Fenton * * * * * * * * *http://www.dfenton.com/ contact via website only * *http://www.dfenton.com/DFA/ |
#8
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |