Make Image field disappear if null value

JudyK

Registered User.
Local time
Yesterday, 19:15
Joined
Sep 30, 2011
Messages
35
I have an image field on a report that keeps showing up even if the field value is null.

=IIf(IsNull([Image_tbl4mgr21]),"",[image_tbl4mgr21])

Any idea how to make the white space completely disappear when that image field is empty?

Judy
 
Try this by putting the following code in the format event for the reports detail section. The run the report by choosing "Print Preview".
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  If IsNull(Me.[Image_tbl4mgr21]) Then
    Me.[Image_tbl4mgr21].Visible = False
  Else
    Me.[Image_tbl4mgr21].Visible = True
  End If
End Sub
 
Thank you so much for providing help. I can't thank you enough. It worked flawlessly.

My understanding of code is limited at best and I really appreciate you taking the time to help me.

Kind regards,

JudyK
 
You're welcome, luck with you project.
 

Users who are viewing this thread

Back
Top Bottom