Printing an address in letter

T

TomC

I am trying to print a confirmation letter with an address in the body of the
report. The address may or may not have an Address2 line. How can I
eliminate the space if the Address2 line is blank? Also, can I use an "IF"
to edit the printing of zero values?
Thanks, tomc
 
E

Evi

Depends on what you mean about the address being in the body of the report.

If there is no label with the address or any text around it then use
Properties to set click on the text box (es) in Design view and set Can Grow
and Can Shrink to yes.
Do the same for the Section that contains the address by clicking on the
grey bar above it and using Properties..

Evi
 
F

fredg

I am trying to print a confirmation letter with an address in the body of the
report. The address may or may not have an Address2 line. How can I
eliminate the space if the Address2 line is blank? Also, can I use an "IF"
to edit the printing of zero values?
Thanks, tomc

You only wish to show Address2 if there is no Address1?
Use an unbound text control:
=IIf(IsNull([Address1],[Address2],[Address1])
 
T

TomC

OK. I should have explained myself better. Let me try it again. My data
base has the typical Name, Address1, Address2, City, State & Zip. I wish to
print these address fields in my letter, but if I have no Address 2, I wish
to move the City, State & Zip directly underneath Address1 eliminating the
blank line. I could use the If statements, but if I am triming the city,
state, zip, will this not present a problem? Tomc

Fred said:
I am trying to print a confirmation letter with an address in the body of the
report. The address may or may not have an Address2 line. How can I
eliminate the space if the Address2 line is blank? Also, can I use an "IF"
to edit the printing of zero values?
Thanks, tomc

You only wish to show Address2 if there is no Address1?
Use an unbound text control:
=IIf(IsNull([Address1],[Address2],[Address1])
 
L

Larry Linson

TomC said:
My data base has the typical Name, Address1, Address2, City,
State & Zip. I wish to print these address fields in my letter,
but if I have no Address 2, I wish to move the City, State &
Zip directly underneath Address1 eliminating the blank line.

Evi gave you the proper answer... if there are no other controls on the same
line, check Help on the CanShrink property. Will work fine on a
normally-formatted letter with the name, address1, address2, city ST zip
above the salutation. May work well, if the address is set off by itself
between paragraphs of text. Won't work if there's any other control on the
same line as the address2 control.

Larry Linson
Microsoft Office Access MVP
 
T

TomC

Thank you Evi and Larry for giving me the answer. Initially I didn't think
Evi's answer which seemed to be so simple would work, but Larry reinforced it
enough for me to try it and wahla, it worked!! Thanks again to you both!
tomc
 

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