Hello
First off, I didn't write the code below, I took it from one of the Microsoft templates, so I am not 100% what it all does, as I am not the best at Access. However, it works very well if every field in the address boxes are filled in. The problem occurs when there is a null value in one of the address boxes and it just leaves a blank line. How do I write it so that if there is a null value there is no blank line, it just moves the line below up?
=IIf(IsNull([NumberOrBuildingName]);"";[NumberOrBuildingName]) & Chr(13) & Chr(10) &
IIf(IsNull([StreetAddress]);"";"" & [StreetAddress]) & Chr(13) & Chr(10) &
IIf(IsNull([AreaAddress]);"";"" & [AreaAddress]) & Chr(13) & Chr(10) &
IIf(IsNull([CountyAddress]);"";"" & [CountyAddress]) & Chr(13) & Chr(10) &
IIf(IsNull([PostCodeAddress]);"";"" & [PostCodeAddress])
Thanks for your time
First off, I didn't write the code below, I took it from one of the Microsoft templates, so I am not 100% what it all does, as I am not the best at Access. However, it works very well if every field in the address boxes are filled in. The problem occurs when there is a null value in one of the address boxes and it just leaves a blank line. How do I write it so that if there is a null value there is no blank line, it just moves the line below up?
=IIf(IsNull([NumberOrBuildingName]);"";[NumberOrBuildingName]) & Chr(13) & Chr(10) &
IIf(IsNull([StreetAddress]);"";"" & [StreetAddress]) & Chr(13) & Chr(10) &
IIf(IsNull([AreaAddress]);"";"" & [AreaAddress]) & Chr(13) & Chr(10) &
IIf(IsNull([CountyAddress]);"";"" & [CountyAddress]) & Chr(13) & Chr(10) &
IIf(IsNull([PostCodeAddress]);"";"" & [PostCodeAddress])
Thanks for your time