Hide control

C

ckerns

I have a checkbox in recordset. I would like to show certain controls
in detail section depending on it's value.

If True show controls a, b, c.
If false show d.

Where and how should I code?

tia
 
F

fredg

I have a checkbox in recordset. I would like to show certain controls
in detail section depending on it's value.

If True show controls a, b, c.
If false show d.

Where and how should I code?

tia

You can place this code in the report's Detail Format event:

[A].Visible = [CheckBoxField]
.Visible = [CheckBoxField]
[C].Visible = [CheckBoxField]

[D].Visible = Not [CheckBoxField]
 
M

Marshall Barton

I have a checkbox in recordset. I would like to show certain controls
in detail section depending on it's value.

If True show controls a, b, c.
If false show d.


Use the Format event of the section containng the controls:

Not sure what you mean by "checkbox in recordset". If its
just another control on the report, then you can use:

Me.A.Visible = Me.checkbox
Me.B.Visible = Me.checkbox
Me.C.Visible = Me.checkbox
Me.D.Visible = Not Me.checkbox
 
Top