Mailing address

R

Roger Bell

I have the following text box on a report:

=Trim([titles] & " " & [firstname]) & " " & [lastname] & Chr(13) & Chr(10) &
Trim([unit/flat] & " " & [unit/flat no] & Chr(13) & Chr(10) & "" & ([street
number] & "" & [street prefix] & " " & [street name]) & Chr(13) & Chr(10) &
Trim([suburb] & " " & [state] & " " & [pcode]))

What I would like is when there is no Unit/Flat in the address, then this
line space will close up.

Could someone kindly advise how this can be achieved? Many Thanks
 
S

StrayBullet via AccessMonster.com

This should get rid of the extra line:

=Trim([titles] & " " & [firstname]) & " " & [lastname] & Chr(13) & Chr(10) &
Iif(not isnull([unitflat]),Trim([unit/flat] & " " & [unit/flat no]) & Chr(13)
& Chr(10),"") & ([street
number] & "" & [street prefix] & " " & [street name]) & Chr(13) & Chr(10) &
Trim([suburb] & " " & [state] & " " & [pcode]))

Roger said:
I have the following text box on a report:

=Trim([titles] & " " & [firstname]) & " " & [lastname] & Chr(13) & Chr(10) &
Trim([unit/flat] & " " & [unit/flat no] & Chr(13) & Chr(10) & "" & ([street
number] & "" & [street prefix] & " " & [street name]) & Chr(13) & Chr(10) &
Trim([suburb] & " " & [state] & " " & [pcode]))

What I would like is when there is no Unit/Flat in the address, then this
line space will close up.

Could someone kindly advise how this can be achieved? Many Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Mailing Address 5
Mailing Address 3
Address Envelope with Trim 1
Address 1
Labels 4
Set focus on a different Form 1
Sorting a concatenated query problem 7
Mailing Labels 3

Top