Stuart McLachlan
stuart at lexacorp.com.pg
Wed Jan 29 18:27:01 CST 2003
> 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, "\")) -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support.