[AccessD] CurrentDB in ADP

David Emerson davide at dalyn.co.nz
Wed Jan 29 22:28:21 CST 2003


Thanks Stuart, Chris, Arthur and Charlotte.  So much to learn, so little 
time. Sigh.

At 30/01/03, you wrote:
> > In an ADP's debug window:
> >
> > ? currentproject.FullName
> > F:\Access\2020.adp
> >
> > Parse it as you do already and you're there.
> >
>.....
> > >      Set dbs = CurrentDb()
> > >      For strLoop = Len(dbs.Name) - 1 To 1 Step -1
> > >          If Mid$(dbs.Name, strLoop, 1) = "\" Then
> > >              basGetCurrentFolder = Left$(dbs.Name, strLoop - 1)
> > >              Exit For
> > >          End If
> > >      Next
> > >
>
>Or more efficiently:
>
>strPath = CurrentProject.Fullname
>strPath = Left$(strPath, InStrRev(strPath, "\"))
>

Regards

David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205 




More information about the AccessD mailing list