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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing blank lines from reports

Status
Not open for further replies.

aquarius9000

Technical User
Jun 18, 2007
1
US
I need to suppress blank lines in the address fields for example: I have a company field but if the client does not have a company I don't want to have a blank line on the report.

I did a search before I posted this and have not found anything helpful.

 
You can build your own text box, for example:

[tt]=[company] + vbCrLf & [adr1] + vbCrLf & [adr2][/tt]
 
I use the following. It may be a bit longwinded but it works for me
Code:
=IIf(nz(Trim([AccountName]),"")<>"",[AccountName] & Chr(13) & Chr(10)) & 
IIf(nz(Trim([Address1]),"")<>"",[Address1] & Chr(13) & Chr(10)) & 
IIf(nz(Trim([Address2]),"")<>"",[Address2] & Chr(13) & Chr(10)) & 
IIf(nz(Trim([City]),"")<>"",[City] & Chr(13) & Chr(10)) & 
IIf(nz(Trim([County]),"")<>"",[County] & Chr(13) & Chr(10)) & 
[PostCode]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top