[AccessD] trying to understand code

Pedro Janssen pedro at plex.nl
Sat Sep 30 14:26:42 CDT 2006


Hello Jim,

that's a great idea.
Thanks.

Pedro

My question in the original mail wasn't complete.

I meant
But in this code is also the part of:    For intCounter .....
I don't understand what's happening there. Who can explain this to me.
Also the format of the textfield where you give the name of the displayed 
picture is: $#.##0,00;($#.##0,00) What does this mean.

For intCounter = Len(strPath) To 1 Step -1
        If Mid$(strPath, intCounter, 1) = "\" Then
            Exit For
        End If
    Next intCounter

    GetPathPart = Left$(strPath, intCounter)









----- Original Message ----- 
From: "Jim Hewson" <JHewson at karta.com>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Saturday, September 30, 2006 12:06 AM
Subject: Re: [AccessD] trying to understand code


> Pedro,
> What I have used is:
> Image.Picture = Application.CurrentProject.Path & "\images\" & GraphicFile
>
> This allows you to move the database to any directory as long the sub 
> directory is named "images".  GraphicFile is the field in the table 
> depicting the graphic file name which includes the extension.
>
> HTH
>
> Jim
> jhewson at karta.com
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Pedro Janssen
> Sent: Friday, September 29, 2006 4:13 PM
> To: AccessD
> Subject: [AccessD] trying to understand code
>
> Hello Group,
>
> i use Candace trips code for displaying photo's in a database, without 
> storing them in a database.
>
> Part of the code is about the path where the picture and database is 
> stored. I changed the pad to store the pictures where i would like to 
> store them. But in this code is also the part of .........
> I don't understand what's happening there. Who can explain this to me.
> Also the format of the textfield where you give the name of the displayed 
> picture is: $#.##0,00;($#.##0,00) What does this mean.
>
>
> Thanks
>
> Pedro
>
>
>
>
>
> Private Function GetPathPart() As String
>
>    Dim db As DAO.Database
>    Dim strPath As String
>    Dim intCounter As Integer
>
>    Set db = CurrentDb
>    strPath = "C:\my-directoryname\"
>    db.Close
>    Set db = Nothing
>
>    For intCounter = Len(strPath) To 1 Step -1
>        If Mid$(strPath, intCounter, 1) = "\" Then
>            Exit For
>        End If
>    Next intCounter
>
>    GetPathPart = Left$(strPath, intCounter)
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> -- 
> 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