View of Controls on a Report

keke10

New member
Local time
Today, 12:30
Joined
Jul 29, 2005
Messages
8
I have a control on a report linked to a "comments" field on a table. However, I only want the control visible if there is data in the corresponding field for each record. If there is no data in the "comments" field for a certain record, the control will not show on the report for that particular record. Any idea on how to do this?
 
keke10 said:
I have a control on a report linked to a "comments" field on a table. However, I only want the control visible if there is data in the corresponding field for each record. If there is no data in the "comments" field for a certain record, the control will not show on the report for that particular record. Any idea on how to do this?
In the On Format event for the report use:

If IsNull([fieldname]) then
Me.controlname.Visible = False
Me.labelcontrolname.Visible = False
Else
Me.controlname.Visible = True
Me.labelcontrolname.Visible = True
End IF

The problem with this is that you still may have a gap in your report.
 

Users who are viewing this thread

Back
Top Bottom