I'm building a report with a image in a Grouped Header. The report has more that one grouped header. When the image control source is null, I want the Image Object to not be visible and the Image Object to shrink to make some spacing work. I've done the same procedure in the detail section of another report with this code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(txtImageName) Then
Me!Image42.Visible = False
Else
Me!Image42.Visible = True
End If
End Sub
It works great in the Detail Section, but gives an error saying Access can not find "txtImageName" when I try the code in the On Format part of my Grouped Header. Any Ideas?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(txtImageName) Then
Me!Image42.Visible = False
Else
Me!Image42.Visible = True
End If
End Sub
It works great in the Detail Section, but gives an error saying Access can not find "txtImageName" when I try the code in the On Format part of my Grouped Header. Any Ideas?