By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,553 Members | 900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,553 IT Pros & Developers. It's quick & easy.

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

P: 1
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(Cancel As Integer, FormatCount As Integer)

Me.Image21.Properties("Picture") = Me.PhotoLink

End Sub

Photolink is a textfield and Image21 is an Image.

Thank you.
Sep 5 '10 #1
Share this Question
Share on Google+
1 Reply

P: 33
Expand|Select|Wrap|Line Numbers
  1. If Me.PhotoLink = "" Then
  2. Me.Image21.Properties("Picture") = Nothing
  3. Else
  4. Me.Image21.Properties("Picture") = Me.PhotoLink
  5. End If
Sep 14 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.