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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding pictures to a report

Status
Not open for further replies.

Dav43

Technical User
Mar 9, 2001
11
AU
I have a list of products I have for sale and want to add a current picture so that I can email a list that shows what each product looks like at the moment. The file size may become too large if I have too many pictures so I want to limit the pictures to the best selling products at the time.

I have used a bound object frame, but I cannot find a way to hide the frames that are empty. I don't want to have a space hold with "No Image Available".

I have also tried using a subreport with the products with pictures in it, but it makes the report too disjointed.

Is there anyone out there who can give me a clue how else I can tackle this problem?

Frustrated
 
You can set the "Can Grow" property to Yes on the detailsection in the report. And then use the Detail_Format event to change the imagesize. Something like this:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If(Me.txtImagePath="") Then
        Me.imgPicture.Height = 5
    Else
        Me.imgPicture.Height = 3000
    End If   
End Sub

Hope this gives you some idea
Hakan Haskel
 
Thanks for your help Hakan, I'll give this a try!

maybe not so frustrated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top