Display images from SQL server in Access report?

Local time
Today, 10:24
Joined
Sep 25, 2015
Messages
1
Hello,

I have an SQL database with a table that contains images (VARBINARY(MAX)). This table is linked into an Access database. I want to show the images in a report.

I can successfully show them in a form, with an unbound image field (img):
Code:
Private Sub Form_Current()
    img.PictureData = Me.Bild
End Sub

I tried the same in a report:
Code:
Private Sub Report_Current()
    img.PictureData = Bild.Value
End Sub

But the event procedure is't called, when the report is opened. It's called, when I click somewhere in the report. Then, images are shown, but it's the same image for all records.

How can I display the images in a report?

Thanks
On Error Resume Next
 
Try placing the code in the On Format event for the section with the image control
 

Users who are viewing this thread

Back
Top Bottom