M
Marie
Using Access. I give up. What is wrong with this code. It
works fine except if the Title and Last name fields are
blank, it puts the First name on the line with the company
name.
=IIf(IsNull([fldAttentionTitle]),"",[fldAttentionTitle]
& " ") & IIf(IsNull([fldAttentionFN]),"",[fldAttentionFN]
& " ") & IIf(IsNull([fldAttentionMName]),"",
[fldAttentionMName] & " ") & IIf(IsNull
([fldAttentionLN]),"",[fldAttentionLN] & Chr(13) & Chr
(10)) & IIf(IsNull([fldAttentionPosition]),"",
[fldAttentionPosition] & Chr(13) & Chr(10)) & IIf(IsNull
([fldCompanyName]),"",[fldCompanyName]) & Chr(13) & Chr
(10) & IIf(IsNull([fldCompanyName2]),"",[fldCompanyName2]
& Chr(13) & Chr(10)) & IIf(IsNull([fldCompanyMailing]),"",
[fldCompanyMailing] & Chr(13) & Chr(10)) & IIf(IsNull
([fldCompanyMailing2]),"",[fldCompanyMailing2] & Chr(13) &
Chr(10)) & IIf(IsNull([fldCity]),"",[fldCity] & ", ") & IIf
(IsNull([fldState]),"",[fldState] & " ") & IIf(IsNull
([fldZip]),"",[fldZip] & Chr(13) & Chr(10) & IIf(IsNull
([fldCountry]),"",[fldCountry]))
Also, how do I get this code to put only Dear First name:
if I don't have a last name (in which case I would not
fill in the title field)?
=IIf(IsNull([fldAttentionTitle]),"","Dear " &
[fldAttentionTitle] & [fldAttentionLN] & ":")
Thanks so much for your help.
Marie
works fine except if the Title and Last name fields are
blank, it puts the First name on the line with the company
name.
=IIf(IsNull([fldAttentionTitle]),"",[fldAttentionTitle]
& " ") & IIf(IsNull([fldAttentionFN]),"",[fldAttentionFN]
& " ") & IIf(IsNull([fldAttentionMName]),"",
[fldAttentionMName] & " ") & IIf(IsNull
([fldAttentionLN]),"",[fldAttentionLN] & Chr(13) & Chr
(10)) & IIf(IsNull([fldAttentionPosition]),"",
[fldAttentionPosition] & Chr(13) & Chr(10)) & IIf(IsNull
([fldCompanyName]),"",[fldCompanyName]) & Chr(13) & Chr
(10) & IIf(IsNull([fldCompanyName2]),"",[fldCompanyName2]
& Chr(13) & Chr(10)) & IIf(IsNull([fldCompanyMailing]),"",
[fldCompanyMailing] & Chr(13) & Chr(10)) & IIf(IsNull
([fldCompanyMailing2]),"",[fldCompanyMailing2] & Chr(13) &
Chr(10)) & IIf(IsNull([fldCity]),"",[fldCity] & ", ") & IIf
(IsNull([fldState]),"",[fldState] & " ") & IIf(IsNull
([fldZip]),"",[fldZip] & Chr(13) & Chr(10) & IIf(IsNull
([fldCountry]),"",[fldCountry]))
Also, how do I get this code to put only Dear First name:
if I don't have a last name (in which case I would not
fill in the title field)?
=IIf(IsNull([fldAttentionTitle]),"","Dear " &
[fldAttentionTitle] & [fldAttentionLN] & ":")
Thanks so much for your help.
Marie