Determine the drive letter of BE database...

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?
 
D

Dirk Goldgar

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Code to find drive letter 2
Database Property MDB vs MDE 2
Set Paper Size 10
Database security 4
Register a library 4
Remote Access Terminal Vista SP1 2
Slow MDE Performance with MSAccess 2007 1
Compact & Repair 1

Top