Nz

  • Thread starter Thread starter Annie
  • Start date Start date
A

Annie

Hi.
I am using
Member Name: Nz([NickName],[FirstName])
so that if a member has a NickName, I'm using it on a
mailing label rather than the FirstName.

However I have Companies that have contacts with
ContactNickName and ContactFirstName.

If there is a NickName, there is not a ContactNickName.

I want one mailing label: if there is a "member" I want
the NickName else the FirstName. If there is a "contact"
I want the ContactNickName else the ContactFirstName.

I tried to build one big Nz statement but it didn't work.
Any suggestions?

Thanks, Annie
 
You have to do it with an iif statement that has some NZs embedded in it.

for example (may not be perfect):

Name: iif(nz(nickname,"") <> "" or nz(firstname, "") <> "", nz(nickname,
firstname), nz(contactnickname, contactfirstname))

If there is a nickname or a firstname, then select from the nickname and
firstname, otherwise, select from the contactname and contactfirstname
This does assume that there is at least one name in there for each person
(nickname or firstname or contactnickname or contactfirstname)
 
Thanks- I'll give it a try!
-----Original Message-----
You have to do it with an iif statement that has some NZs embedded in it.

for example (may not be perfect):

Name: iif(nz(nickname,"") <> "" or nz(firstname, "")
firstname), nz(contactnickname, contactfirstname))

If there is a nickname or a firstname, then select from the nickname and
firstname, otherwise, select from the contactname and contactfirstname
This does assume that there is at least one name in there for each person
(nickname or firstname or contactnickname or contactfirstname)


Hi.
I am using
Member Name: Nz([NickName],[FirstName])
so that if a member has a NickName, I'm using it on a
mailing label rather than the FirstName.

However I have Companies that have contacts with
ContactNickName and ContactFirstName.

If there is a NickName, there is not a ContactNickName.

I want one mailing label: if there is a "member" I want
the NickName else the FirstName. If there is a "contact"
I want the ContactNickName else the ContactFirstName.

I tried to build one big Nz statement but it didn't work.
Any suggestions?

Thanks, Annie


.
 
Back
Top