David Emerson
davide at dalyn.co.nz
Wed Jan 29 17:49:00 CST 2003
I have some 97 code which returns the folder the current database is in -
Dim dbs As DAO.Database, strLoop As Integer
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
I am upgrading it for an XP ADP. When it is run the Currentdb call returns
nothing.
I have made sure that the DAO 3.6 Object library is checked in references
(as per help). What is wrong, or is there an easier way to get the current
folder? I tried CurDir but this is not what I want.
Regards
David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205