Blank lines in report

G

Guest

I have a question I hope you can answer. I have produced a invoice report which incorporated the customers names and addresses. However some of the data in the field on the table are emply and this of course is coming out as a blank line in my report

The fields I have at present read like this:-

=[First name &] " " & [Last name]
Address 1
Address 2
Address 3
Town
Postal code

I hope you can help

Regards

Gordon
 
M

MyndPhlyp

Gordon said:
I have a question I hope you can answer. I have produced a invoice report
which incorporated the customers names and addresses. However some of the
data in the field on the table are emply and this of course is coming out as
a blank line in my report
The fields I have at present read like this:-

=[First name &] " " & [Last name]
Address 1
Address 2
Address 3
Town
Postal code

How about changing to a single text box, setting the CanShrink/CanGrow, and
then take advantage of the "+" operator propagating Nulls making the
contents read something like:

([Address1]+Chr$(13)+Chr$(10)) & _
([Address2]+Chr$(13)+Chr$(10)) & _
([POBox]+Chr$(13)+Chr$(10)) & _
(([City]+", ") & ([StateProvince]+" ") & [ZipPostalCode]+Chr$(13)+Chr$(10))
& _
([Country])

It not only eliminates extra lines, it also eliminates unnecessary
punctuation within the parenthesis.

If Address1 is Null, the result of the formula between "(" and ")" results
in Null. Since Nulls don't print, and no CRLF was added because Address1 was
Null (propagation), the line is eliminated from output. Go through the same
routine for the remainder of the formula.

(Example stolen in its entirety from Page 135 of "Access Cookbook" published
by O'Reilly, authored by Getz, Litwin & Baron. All rights reserved. All
wrongs reversed. Tax, tags, title, destination, dealer prep and other
charges apply. Not available in all locations. Your mileage may vary.)
 

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