Make Image field disappear if null value (1 Viewer)

JudyK

Registered User.
Local time
Today, 08:00
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
 

JHB

Have been here a while
Local time
Today, 15:00
Joined
Jun 17, 2012
Messages
7,732
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
 

JudyK

Registered User.
Local time
Today, 08:00
Joined
Sep 30, 2011
Messages
35
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
 

JHB

Have been here a while
Local time
Today, 15:00
Joined
Jun 17, 2012
Messages
7,732
You're welcome, luck with you project.
 

Users who are viewing this thread

Top Bottom