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

Display image for each record only when available 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
584
GB
Hello,

I have a report to show a property inventory.

Basically it has one record for each room.

The record also has a field for storing a path to a photo

I would like to format the report so there is no blank space in records which do not have a photo. What is the best approach for this?

Many thanks Mark.
 
You could write some code in the On Format event of the section of the report containing the image.

This is what worked for me. I checked for a different condition and have different sizes and names. Section(0) is the detail section.

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.TotalQty > 0 Then
        Me.Image3.Visible = True
        Me.Section(0).Height = 4 * 1440
        Me.Image3.Height = 1440
     Else
        Me.Image3.Visible = False
        Me.Section(0).Height = 1440
        Me.Image3.Height = 1
    End If
End Sub


Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top