In the detail section of a report I want to hide a checkbox control and it's label if the value of the control is false. I sort of expected the following to work.
However, it DOESN'T!! The code has no effect at all. If I replace it by just one line ...
... again, the code seems to have no effect at all. Check box still there!!!
I'm sure (thinking back to my ancient Access 2003 days) I was able to do this conditional report formatting once upon a time. This granny possibly approaching senility.
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.CheckBox1 = True then Me.CheckBox1.Visible = True Else Me.CheckBox1.Visible = False End If 'or, more obscurely, in one line "Me.CheckBox1.Visible = Me.CheckBox1" End Sub
Code:
Me.CheckBox1.Visible = False 'just for experimental purposes
I'm sure (thinking back to my ancient Access 2003 days) I was able to do this conditional report formatting once upon a time. This granny possibly approaching senility.
Comment