How create a field where the nickname is used instead of the first

J

jmuirman

I want to create a field where the nickname is used instead of the firstname
if there is a nickname - but use the first name if there is no nickname.

Here's what I'm working with:

Expr1: [tContacts_2.CFirstName]+"" & [tContacts_2.CNickname]

Thanks,

John
 
F

fredg

I want to create a field where the nickname is used instead of the firstname
if there is a nickname - but use the first name if there is no nickname.

Here's what I'm working with:

Expr1: [tContacts_2.CFirstName]+"" & [tContacts_2.CNickname]

Thanks,

John

Expr1: IIf(IsNull([CNickName]),[CFirstName], [CNickname])
 
O

Olduke

jmuirman said:
I want to create a field where the nickname is used instead of the firstname
if there is a nickname - but use the first name if there is no nickname.

Here's what I'm working with:

Expr1: [tContacts_2.CFirstName]+"" & [tContacts_2.CNickname]

Thanks,

John

Try
Expr1: IIF([Tcontacts_2.CNickname]<>" "[tContacts_2.CFirstName]+"" &
[tContacts_2.CNickname],[tContacts_2.CFirstName])

This is telling the expression that if nickname is not null, use the
firstname and nickname, otherwise use the first name.

I think I got the bracketting and everything correct.
 
J

jmuirman

Perfect! Thanks,

John

fredg said:
I want to create a field where the nickname is used instead of the firstname
if there is a nickname - but use the first name if there is no nickname.

Here's what I'm working with:

Expr1: [tContacts_2.CFirstName]+"" & [tContacts_2.CNickname]

Thanks,

John

Expr1: IIf(IsNull([CNickName]),[CFirstName], [CNickname])
 
J

jmuirman

Thanks for your help!

Olduke said:
jmuirman said:
I want to create a field where the nickname is used instead of the firstname
if there is a nickname - but use the first name if there is no nickname.

Here's what I'm working with:

Expr1: [tContacts_2.CFirstName]+"" & [tContacts_2.CNickname]

Thanks,

John

Try
Expr1: IIF([Tcontacts_2.CNickname]<>" "[tContacts_2.CFirstName]+"" &
[tContacts_2.CNickname],[tContacts_2.CFirstName])

This is telling the expression that if nickname is not null, use the
firstname and nickname, otherwise use the first name.

I think I got the bracketting and everything correct.
 

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