How to Suppress Report Line Containing Label But With Blank/Null D

P

Paputxi

I am trying to determine how I can suppress printing a line on a report when
the associated data is blank or null but when there is label identified.
Using the address label scenario, I am printing "Name:", "Address1:",
"Address2:", "City/State/ZIP:" all on separate lines to include the text
shown between the quotes and followed by the data. Is there a way that I can
suppress printing the Address2 line when the associated data is blank or
null? Thanks in advance.
 
A

Allen Browne

Set the CanShrink property of the Address2 text box to Yes.
If the field is null, it will shrink unless there is something else on the
line, or overlapping it vertically.

If you have a label for Address2, right-click it and choose Change To | Text
box. Set the Control Source of this text box to:
=IIf([Address2] Is Null, Null, "Address2:")
Set its CanShrink to Yes.
Make sure its Top is identical to the Top of the Address2 text box.

Now the label will be null (and therefore shrinkable) whenever Address2 is
null.
 
D

Duane Hookom

You can change the "Address1:" label to a text box with a control source of:
="Address1: " + [Address1]
Make sure the text box is wide enough to only display Address1 and set its
Can Grow to "No". If the Address1 field is Null then the "label" text box
will also be null. If the "label" text box is set to Can Shrink: Yes then it
will shrink to 0 height if Address1 is 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