[AccessD] CurrentDB in ADP

Chris Mackin chris at denverdb.com
Wed Jan 29 18:01:00 CST 2003


There is no database object in an ADP, you can use:

CurrentProject.Path to return the folder
CurrentProject.Name to return the .adp name
CurrentProject.FullName to return the folder and name.

Chris Mackin
Denver Database Consulting, LLC
chris at denverdb.com


-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com]On Behalf Of David Emerson
Sent: Wednesday, January 29, 2003 4:48 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] CurrentDB in ADP


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

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list