View Full Version : Visible/Invisible Lines


cihow81
04-26-2005, 12:12 AM
Hi,

I was wondering if anyone knows how to make the lines invisble when there is no input to the control source. I have draw a line below a field inside my report, and when there is no value or null value for that particular field, i want the line to become invisble also... anyone knows how to do it??? :confused:

Brianwarnock
04-26-2005, 12:57 AM
You would need to place code in the on format event of the relevent section of the report.

Brian

cihow81
04-26-2005, 01:06 AM
Hi,

Which part of format of the section should i look out for? And what code do i add in? I am relatively new to Access. :confused:

Brianwarnock
04-26-2005, 01:19 AM
Your control (field) is probably in the detail section of the report so in design view right click the detail header select properties select event tab select format select the... code select code builder and enter code similar to

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.fldmine) Then
Me.Line15.Visible = False
Else: Me.Line15.Visible = True
End If
End Sub

Brian

cihow81
04-26-2005, 02:14 AM
hi,

Thanks a million...

Brianwarnock
04-26-2005, 02:46 AM
Happy to help

Brian