• Photo Directory (Access 97 SR2)

    Author
    Topic
    #368366

    I would like to create an Access report for use as a photo directory. I have three fields in a table with one containing the location of the image files which are in “jpg” format. I have tried to use a bound object frame but can’t seem to make the report display the images. Anyone else ever tried to do this successfully?

    Viewing 0 reply threads
    Author
    Replies
    • #576963

      i am assuming that you would like the photos to change with the record (in each detail section). what i have done is use an unbound object and set its picture property to the file location by entering code into the detail “on format” event. if you know vba, this is a simple procedure. if you need help, let me know, or i can do a sample report for you (i could even do it on the report you are working on if you would like to email it to me). hope this helps you out

      happy to help

      • #576964

        That is correct … I would like the image to change for each record on the report. I would really appreciate if you could do a sample report if it’s not too much trouble.

        Thanks!

        • #577006

          I would love to see the sample, too. Please post it if possible. I am doing a similar thing, whereby I want to create a button that the user clicks for each record that will then open a viewer or list of pictures related to that record. Then, the user would double click on the name of the picture to open it. I think this is the same thing you’re talking about doing.

          • #577057

            The problem is that the images would also have to be posted, which isn’t practical.

            However, if you have a table with a field for the path of the image files, your form needs that field and an image control with code to set the Picture property of that image control. Here’s an example of the OnCurrent event procedure for a form that handles various graphic formats. ImgTextPath is the field that holds the path for the graphic file and imgVisual is the image control that displays the graphic.

            Private Sub Form_Current()
              On Error Resume Next
              If Len(Me.ImgTextPath & "") > 0 Then
                Me.imgVisual.Picture = Me.ImgTextPath
              End If 'Len(Me.ImgTextPath & "") > 0
            End Sub 'Form_Current()

            If you wanted to use a button and dialog, you would have to capture the selected file name and path and use that to set the picture property of the image control.

        • #577103

          Take a look at Post 125987, where the same question was answered. You need to use an Image control and set its Picture property in the Format event of the detail section of your report.

    Viewing 0 reply threads
    Reply To: Photo Directory (Access 97 SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: