Hide label in HEADER if textbox in DETAIL is Null

S

scion111

I see several great suggestions about how to hide a label if a text box
is Null within a section of the report. However, my problem is slightly
different, and I'd appreciate any suggestions.

My report is a mail merge letter, which may or may not contain
enclosures. I have a field called "ProjectEnclosureDescription" in the
detail section. I have a label in the header section called
"Enclosures:"

I need the "Enclosures:" label in the header to appear only if the
"ProjectEnclosureDescription" field in the detail section is Not Null.
I can't put the label in the detail, because then the label would show
for each and every enclosure.

If the label is in the header, here's an example of what I expect the
output to look like:

Enclosures:
Enclosure 1
Enclosure 2

With the label in the detail section here's what I get:

Enclosures:
Enclosure 1

Enclosures:
Enclosure 2

If there are no enclosures, i.e., the text box is Null, nothing at all
would print.

Hope I've explained this adequately!
 
D

Duane Hookom

Change the label to a text box and set its Control Source to:
=IIf(Count([EnclosureFieldName])>0,"Enclosures",Null)
 

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