Check box on report invisible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a check box [InList] on a report that should only be visible if
[DescIDNo] has a value.

I tried... but it does not work.

If Me.DescIDNo <> vbNull Then
InList.Visible = True
Else
InList.Visible = False
End If

Can anyone help??

Thanks
 
If IsNull(Me.DescIDNo) = True Then
InList.Visible = False
Else
InList.Visible = True
End If

or

InList.Visible = Not IsNull(Me.DescIdNo)
 
It would probably work by changing the first line to:
If IsNull(Me.DescIDNo) Then

But there's a more snazzy way to do it, without any code. See:
Format check boxes in reports
at:
http://allenbrowne.com/ser-52.html

Use a text box with ControlSource of:
=([DesclDNo] Is Null)
and format it so it shows no character for false.

This gives you control over the size, style, and color of the check box, and
works much faster than code.
 
Back
Top