Suppress Blank Fields

G

Guest

I'm using the address label wizard to create some mailing labels. The query
I'm basing the report on has the following fields:

Name1
Name2
Address1
Address2
CityStateZip
Country (blank if it's USA)

I want them to be displayed in that order, but I don't want there to be a
blank line if a certain field has a blank. For instance, right now a
"standard" address is displaying like this:

Mr. & Mrs. Bill Smith
(blank line - no Name2)
123 Main Street.
(blank line - no Address2)
Newton Falls, OH 44444
(blank line - country is USA)

I want to display that address like this:
Mr. & Mrs. Bill Smith
123 Main Street.
Newton Falls, OH 44444

while still utilizing the other fields if they're needed for other addresses.

Is that possibe? Thanks.
 
G

Guest

Sorry for the double post...when I tried to post my question initially, I got
an error saying there was a problem and that my message wasn't saved.
 
M

Marshall Barton

MDW said:
I'm using the address label wizard to create some mailing labels. The query
I'm basing the report on has the following fields:

Name1
Name2
Address1
Address2
CityStateZip
Country (blank if it's USA)

I want them to be displayed in that order, but I don't want there to be a
blank line if a certain field has a blank. For instance, right now a
"standard" address is displaying like this:

Mr. & Mrs. Bill Smith
(blank line - no Name2)
123 Main Street.
(blank line - no Address2)
Newton Falls, OH 44444
(blank line - country is USA)

I want to display that address like this:
Mr. & Mrs. Bill Smith
123 Main Street.
Newton Falls, OH 44444

while still utilizing the other fields if they're needed for other addresses.


The simple way to do this is to set the text box snd its
section's CanShrink property to Yes.

That won't be effective if you have other controls in the
same horizontal "band". In this situation, you can do it
with a single text box for the entire address by using an
expression like:
=Name1 & Chr(13) + Chr(10) & (Name2 + Chr(13) + Chr(10)) &
Address1 & (Address2 + Chr(13) + Chr(10)) & CityStateZip &
(Chr(13) + Chr(10) + Country)
 

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