[AccessD] CurrentProject.Path syntax?

Heenan, Lambert Lambert.Heenan at chartisinsurance.com
Wed Mar 17 10:44:26 CDT 2010


CurrentProject.Path does not end with "\", which is why I keep this little function handy...

Public Function QualifyPath(sPath As String) As String
    If sPath & "" > "" Then
        If right$(sPath, 1) = "\" Then
            QualifyPath = sPath
        Else
            QualifyPath = sPath & "\"
        End If
    End If
End Function

.. By using it I don't have to think about path terminators.

Lambert 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman
Sent: Wednesday, March 17, 2010 11:31 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] CurrentProject.Path syntax?

...the following two lines point to the same file ...but only line two works ...what is my befuddled mind missing this time?

'MetaDraw0.LoadPicture (CurrentProject.Path & "MBCC_HallC_Spring_001a.mdp"), 0, 0 MetaDraw0.LoadPicture "v:\JISWORKING\TMS\MBCC_HallC_Spring_001a.mdp", 0, 0

William 


--
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