Omit "Nickname" in concatenated field

  • Thread starter Thread starter Robin Chapple
  • Start date Start date
R

Robin Chapple

I have a database where [NickName] is used as the means of addressing
a member if the member is not commonly known by his formal
[FirstName].

In a report I need to include the [NickName] if it is different from
the [FirstName] and enclose it in curved brackets. I have used this
code and failed. It reads the " Iif ... Is Null" and omits the
brackets but still quotes the [NickName] when it is the same as the
[FirstName]

="Name: " & [FirstName] & IIf([NickName] Is Null Or
[Nickname]=[FirstName]," "," (" & [Nickname] & ")") & " " & [LastName]

Thanks,

Robin Chapple
 
Perhaps this:

="Name: " & [FirstName] & (IIf(Len([NickName] & "")=0 Or
[Nickname]=[FirstName],""," (" & [Nickname] & ")") & " " & [LastName]
 
How about:
="Name: " & IIf([NickName] Is Null Or [NickName]=[FirstName],[FirstName] & "
",[FirstName] & " (" & [NickName] & ") ") & [LastName]

Another approach would be code in the report's
 

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

Similar Threads

Omit nickname in concatenated field 3
Putting text in parentheses 2
IIf issue 3
IIf 18
Nicknames 8
can I create contacts from the nickname cache in outlook 1
Union query- count records 2
Name order streamlining 21

Back
Top