Form Letter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My database has a listing of customers. Some of my customers are people some
are businesses. I have the "addressee" part of my form letter working, but
when I try to get the Dear ______, done, how would I get the letter to
recognize that if the [Attention] is blank, to use the information in
[Customer]? Thank you so much for your help.
 
You should be able to set the control source to something like:

="Dear " & Nz([Attention], [Customer])
 
IIf(IsNull([Attention]), [Customer], [Attention])

See IIf Function in the help files for more information.

If you are doing everything in Access, you can use the NZ function, which is
a bit simpler ...

NZ([Attention], [Customer])

The NZ function is Access-specific, though, and would not work in other
Office apps. (Your mention of 'form letter' left me thinking that just maybe
you might be using the mail merge feature in Word to print letters using
data stored in an MDB, in which case you would not be able to use the NZ
function).
 
Thank you so much. It worked perfectly.

Brendan Reynolds said:
IIf(IsNull([Attention]), [Customer], [Attention])

See IIf Function in the help files for more information.

If you are doing everything in Access, you can use the NZ function, which is
a bit simpler ...

NZ([Attention], [Customer])

The NZ function is Access-specific, though, and would not work in other
Office apps. (Your mention of 'form letter' left me thinking that just maybe
you might be using the mail merge feature in Word to print letters using
data stored in an MDB, in which case you would not be able to use the NZ
function).

--
Brendan Reynolds
Access MVP


dtjbocala said:
My database has a listing of customers. Some of my customers are people
some
are businesses. I have the "addressee" part of my form letter working,
but
when I try to get the Dear ______, done, how would I get the letter to
recognize that if the [Attention] is blank, to use the information in
[Customer]? Thank you so much for your help.
 
Back
Top