Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Address lines missing when fiels is blank,

Status
Not open for further replies.

allenEd

Technical User
Nov 14, 2002
129
GB
Hi,

I have a report was is basically a mailer. If some of the address fields are blank, I get a gap in the address when printed. (As you would expect I guess).

How can I get my addreess to look neat with no gaps?

thanks in advance
Allen
 
Set the text box "Can Shrink" property to yes for the address lines that may be blank. This will eliminate the gaps. Maq [americanflag]
<insert witty signature here>
 
Along with setting the property of the field to can grow and can shrink, make the field a calculated field using the Trim function. For example:

Control Source=Trim([name of field])
Can Grow=Yes
Can Shrink=No

Cindy
 
sorted it...

Creat a text box in the report, select the build button in the control source and enter ALL the fields as example...

=IIf(IsNull([Ad1]),&quot;&quot;,[Ad1] & Chr(13) & Chr(10)) &
IIf(IsNull([Ad2]),&quot;&quot;,[Ad2] & Chr(13) & Chr(10)) &
IIf(IsNull([Ad3]),&quot;&quot;,[Ad3] & Chr(13) & Chr(10)) &.....


in this case Ad1 is my data field for address line one, just swap these for your own field..
(this does work), any problems are with syntax..
good luck

AllenEd :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top