display pathname of linked mdb

S

susan

Hi,

My application contains 2 databases:
appl.mdb and data.mdb. From appl.mdb I link to data.mdb.
How can I (in appl.mdb using a commandclick) display the full pathname of
the data.mdb?

Thanks,

Susan
 
D

Dennis

In the On Click of your command button put this code

MsgBox CurrentDb.TableDefs("Name of a Linked Table").Connect
 
P

Piet Linden

Hi,

My application contains 2 databases:
appl.mdb and data.mdb. From appl.mdb I link to data.mdb.
How can I (in appl.mdb using a commandclick) display the full pathname of
the data.mdb?

Thanks,

Susan

If you have a linked table, you can read the Connect property

Debug.Print DBEngine(0)(0).TableDefs("YourTable").Connect
 
G

Graham R Seach

This is probably better than using the Connect property:
DLookup("[Database]","MSysObjects","[Name] = 'nameofyourtable'")

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Top