Determine the drive letter of BE database...

  • Thread starter Thread starter ambushsinger
  • Start date Start date
A

ambushsinger

I have an mde that accesses a back end mdb. Using VBA...how can I determine
the network drive letter of that back end database?
 
PieterLinden via AccessMonster.com said:
depends on how it's mapped.... you should be able to take just the
leftmost
character of the Connect property of an attached tabledef

Left$(DBEngine(0)(0).Tabledefs("tdfAttached").Connect,1)

It won't be the 1st character of the Connect property, because for an Access
back-end that will begin with ";DATABASE=". Use

Mid$(DBEngine(0)(0).Tabledefs("tdfAttached").Connect, 11, 1)
 
Back
Top