Path to db

S

shaggles

I want my db to generate an email with a link back to the
database. I know I can get the database path using
CurrentDB().Name but this references a drive letter.
Since my database is on a networked drive different users
may have it mapped to different drive letters. How can I
reference the db with the actual server name in place of
the drive letter?
 
S

shaggles

I figured out how to get the path to the drive after I
posted this. However I'm still struggling with getting
the complete path to my database though. Is it possible
to return a complete path to a file? Or can I only get
the path to the drive?
 
G

Graham R Seach

Sorry, you've lost me now. I've just given you the answer - where's the
problem?

Using the code and the reference I gave you:
LetterToUNC(Left(CurrentDb.Name, 2)) & Mid(CurrentDb.Name, 3)
will return the UNC path to your database.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 

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

Top