Hiding field name if record is blank

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.
 
M

Marshall Barton

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)
 
D

Duane Hookom

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top