Hiding field name if record is blank

  • Thread starter Thread starter David
  • Start date Start date
D

David

In a report, I want to hide a record's label/ caption if
the record is null/ blank.

Basically, in a column design report... I don't want it to
have a field name if there is no data next to it.

Any suggestions would be greatly appreciated.
 
David said:
In a report, I want to hide a record's label/ caption if
the record is null/ blank.

Basically, in a column design report... I don't want it to
have a field name if there is no data next to it.

Use a little code in the detail section's Format event:

Me.thetextbox.Visible = Not IsNull(Me.thetextbox)
 
Another method is to change label to a text box. Set the control source of
the "label" text box to something like:
="Field Caption " + [TheFieldName]
Set the width of the text box to wide enough to show the field caption. Make
sure it is set to not grow.
 
Back
Top