Re: VBA for Path of Current MDB
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Aug 2008 13:16:50 -0400
"undrline via AccessMonster.com" <u28594@uwe> wrote in message news:89670109a9d89@xxxxxx
I want to relink tables based on the current path of the file (second mdb
will always be in the same directory as the first). I have the module all
set up for relinking. I just need to know how to get at the current path.
Does Access know what directory the current file is located in? How do I get
at that in VBA? Will it return the UNC path or the logical path, or can I
choose?
In Access 2000 and later, CurrentProject.Path gives the folder path. If that's a network path, I don't know for sure whether it will be the UNC path or not. However, you really should not be running the front-end database from a network share, as that is more corruption-prone.
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- Follow-Ups:
- Re: VBA for Path of Current MDB
- From: undrline via AccessMonster.com
- Re: VBA for Path of Current MDB
- Prev by Date: RE: Error 3020 for VB: Update of CancelUpdate without AddNew or Ed
- Next by Date: RE: Sending email from access - Reference Stephen Lebans code
- Previous by thread: Error 3020 for VB: Update of CancelUpdate without AddNew or Edit?
- Next by thread: Re: VBA for Path of Current MDB
- Index(es):
Relevant Pages
|