labels

  • Thread starter Thread starter Dana
  • Start date Start date
D

Dana

We are trying to print labels that have 4 lines. Some do
not have information in the 2nd address line, and we would
like to delete that empty line without also deleting the
2nd address lines with text. How can we do this?
 
Dana,

You can set the Can Shrink property of your text boxes to 'Yes'. With that
setting, the line will not appear if there is no info but will display and
print if it has data.

hth,
 
We are trying to print labels that have 4 lines. Some do
not have information in the 2nd address line, and we would
like to delete that empty line without also deleting the
2nd address lines with text. How can we do this?

I tend to use the different behaviour of the + and & operators:

If [Line2] is null, then ([Line2]+vbNewLine) is null as well, so you can
create a single multiline text box for the label, and set its control
source to something like this:

(FName + " ") & LName & vbNewLine &
(Line1 + vbNewLine) &
(Line2 + vbNewLine) &
(Line3 + vbNewLine) &
(Line4 + vbNewLine) &
PostCode

assuming that LName always has a value. In this way, any missing fields
will swallow up their associated vbNewLines and make the entire line
disappear.

Hope that helps


Tim F
 
Back
Top