Displaying Image in Report, but if textbox is empty repeats last image!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michael Swan
    New Member
    • Sep 2010
    • 1

    #1

    Displaying Image in Report, but if textbox is empty repeats last image!

    Hello and thanks in advance for any help.

    I have a report that i'd like to display an Image for each record. But not all records have an image. The problem I have is that the last image is then repeated in the next record.

    I would like to know how to have any empty field display a default image.

    Code I have in report

    Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)

    Me.Image21.Prop erties("Picture ") = Me.PhotoLink

    End Sub

    Photolink is a textfield and Image21 is an Image.

    Thank you.
  • marcellus7
    New Member
    • Oct 2008
    • 33

    #2
    Code:
    If Me.PhotoLink = "" Then
    Me.Image21.Properties("Picture") = Nothing
    Else
    Me.Image21.Properties("Picture") = Me.PhotoLink
    End If

    Comment

    Working...