Merge Ltr in Access

A

Aurora

I am using Access 2003
I am crearing a merge letter in Access. For the address - there are 3 lins:
Add line 1, add line 2 and one line with City,St & Zip. I have it set up as
follows:

Add 1
Add 2
City-State-Zip

When there is no Add line 2 data this leaves a blank line. If I use "trim"
for add 1 and add 2, this runs everything together in one line. How do I get
Access to delete add line 2, if there is no information in the field?

Aurora
 
K

KARL DEWEY

Use --
IIF([Add2] Is Null Or ([Add2] ="", [Add1], [Add1] & Chr(13) & Chr(10) &
([Add2])
 
F

fredg

I am using Access 2003
I am crearing a merge letter in Access. For the address - there are 3 lins:
Add line 1, add line 2 and one line with City,St & Zip. I have it set up as
follows:

Add 1
Add 2
City-State-Zip

When there is no Add line 2 data this leaves a blank line. If I use "trim"
for add 1 and add 2, this runs everything together in one line. How do I get
Access to delete add line 2, if there is no information in the field?

Aurora

All you need is 1 unbound text control for the addresses and city,
state, and zip.
Set it's control source to:

=[Add1] & Chr(13) & Chr(10) & ([Add2]+(Chr(13) & Chr(10))) & [City] &
", " & [State] & " " & [Zip]

Note the placement of the parenthesis and the + instead of the &.

You could also include the name with the above unbound control:
=[FirstName] & " " & [LastName] & chr(13) & chr(10) & [Add1] & etc...
 

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

Top