Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Pictures in Reports! 1

Status
Not open for further replies.

Vidar13

IS-IT--Management
Apr 4, 2001
90
0
0
US
I've worked with forms and creating coded links to picture files (jpegs), (rather than bloating my db with OLE objects), and it works pretty well, however, I'm not sure how to print those linked pictures in a report??

Namely, the problem is, that there is no place to trigger code to update the fieldname.picture property for a "linked" picture control for each record??? Am I missing something here? I know I would simply put an OLE control, linked to the OLE field to print out pictures in a report if I were going that route, but this is a sizeable db, with thousands of pictures going into a catalog.

Any ideas?
 
There is a place to update the link: Format event of the section containing the image.
I assume you have a field in the table pointing to a image file on (a) drive. I called the field ImgLink.
Insert an Image control in the Detail section and point to [any] picture you have available.
Then insert the following code:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Me("ImageControlName").Picture = "C:\My Documents\My Pictures\" & ImgLink
End Sub

Works fine for me...

[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top