Concatenation

AndyShuter

Registered User.
Local time
Today, 21:46
Joined
Mar 3, 2003
Messages
151
Hi,

Just wondered if someone could help me with this prob?

The following text appears in a text box on a report

=[HirerCurrHouseNo] & " " & [HirerCurrAddress1] & Chr(13) & Chr(10) & [HirerCurrAddress2] & Chr(13) & Chr(10) & [HirerCurrTown] & Chr(13) & Chr(10) & [HirerCurrPostcode]

My prob is that if say "Address line2" is blank, I get horrible blank line in address (which looks rubbish when pirnting a letter!). What I would really like to do is move the lines up so they show as a proper address..

eg
Mr Joe Bloggs
29 The Street
Anytown
HD11AG

Not

Mr Joe Bloggs
29 The Street

Anytown
HD11AG
Thanks - And Merry Xmas!
 
Use an Iif to findout it is blank, then if blank do not add the field and not the "vbnewline" (Chr(13) & Chr(10))

and if it is not blank, then do add it...

Seasons greetings from Amsterdam

The Mailman
 

Users who are viewing this thread

Back
Top Bottom