View Full Version : Concatinating Address Lines


sush
05-03-2000, 02:17 AM
Hi,

I have 3 address lines, town , county and a postcode,

On a report i would like to print this information but as these are seperate fields, if any information in any of the lines is not entered a gap is left before the next field.

Is there a way to stop this? i.e by having all the address information concatinated into one field which will expand and surpress depending on whether all or some address information is used??


Thanks in Advance

Phillip
05-03-2000, 09:00 PM
Add a column to the underlying query; Something like this:

AllThree: Iif(IsNull([town]),"",[town] & " ") & Iif(IsNull([county]),"",[county] & " ") & [postcode]

Then just create one (wide enough) text box on your report and assign its control source to your new field ("AllThree").

sush
05-04-2000, 06:36 AM
Hi,

Thanks for the advice i tried this and it seems to work, but it puts everything on one line and not under each line.

Any ideas

thanks in advance

Pat Hartman
05-04-2000, 03:48 PM
Use the same technique that the label wizard uses. Set the can shrink/can grow properties of all of the address fields to yes. Also set the can shrink/can grow properties of the detail section to yes. Access will suppress printing a line if it is blank.