Concatenate

C

carrie08

I need to concatenate FirstName and LastName columns into one field for a
calculated column. The formula that I am using is not showing my names in the
column even though I have the show box checked. This is my formula:

Contact Name: IIF(IsNull([Company]), [FirstName] & " " & [LastName],
[Company])
-- Why are my names not coming through, even though all the other
information is sorted.
kae
 
J

John Spencer

Try testing for Null and zero-length strings

Contact Name: IIF(IsNull([Company]) or [Company]="", [FirstName] & " " &
[LastName], [Company])


Or simpler
Contact Name: IIF([Company] & "" = "",[FirstName] & " " & [LastName] ,[Company])


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
C

carrie08

No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


John Spencer said:
Try testing for Null and zero-length strings

Contact Name: IIF(IsNull([Company]) or [Company]="", [FirstName] & " " &
[LastName], [Company])


Or simpler
Contact Name: IIF([Company] & "" = "",[FirstName] & " " & [LastName] ,[Company])


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I need to concatenate FirstName and LastName columns into one field for a
calculated column. The formula that I am using is not showing my names in the
column even though I have the show box checked. This is my formula:

Contact Name: IIF(IsNull([Company]), [FirstName] & " " & [LastName],
[Company])
-- Why are my names not coming through, even though all the other
information is sorted.
kae
 
G

Gina Whipp

Kae,

Try.. Nz([Company],[FirstName]&" "&[LastName])

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

carrie08 said:
No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


John Spencer said:
Try testing for Null and zero-length strings

Contact Name: IIF(IsNull([Company]) or [Company]="", [FirstName] & " " &
[LastName], [Company])


Or simpler
Contact Name: IIF([Company] & "" = "",[FirstName] & " " & [LastName]
,[Company])


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I need to concatenate FirstName and LastName columns into one field for
a
calculated column. The formula that I am using is not showing my names
in the
column even though I have the show box checked. This is my formula:

Contact Name: IIF(IsNull([Company]), [FirstName] & " " & [LastName],
[Company])
-- Why are my names not coming through, even though all the other
information is sorted.
kae
 
C

carrie08

No, that doesn't work.
--
kae


Gina Whipp said:
Kae,

Try.. Nz([Company],[FirstName]&" "&[LastName])

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

carrie08 said:
No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


John Spencer said:
Try testing for Null and zero-length strings

Contact Name: IIF(IsNull([Company]) or [Company]="", [FirstName] & " " &
[LastName], [Company])


Or simpler
Contact Name: IIF([Company] & "" = "",[FirstName] & " " & [LastName]
,[Company])


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

carrie08 wrote:
I need to concatenate FirstName and LastName columns into one field for
a
calculated column. The formula that I am using is not showing my names
in the
column even though I have the show box checked. This is my formula:

Contact Name: IIF(IsNull([Company]), [FirstName] & " " & [LastName],
[Company])
-- Why are my names not coming through, even though all the other
information is sorted.
kae
 
C

carrie08

Okay, I started over and found out that the FirstName and LastName fields had
Contact preceding them. I attached Contact to the expressions and it worked.
OH, how, particular this software is.
--
kae


Gina Whipp said:
Kae,

Try.. Nz([Company],[FirstName]&" "&[LastName])

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

carrie08 said:
No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


John Spencer said:
Try testing for Null and zero-length strings

Contact Name: IIF(IsNull([Company]) or [Company]="", [FirstName] & " " &
[LastName], [Company])


Or simpler
Contact Name: IIF([Company] & "" = "",[FirstName] & " " & [LastName]
,[Company])


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

carrie08 wrote:
I need to concatenate FirstName and LastName columns into one field for
a
calculated column. The formula that I am using is not showing my names
in the
column even though I have the show box checked. This is my formula:

Contact Name: IIF(IsNull([Company]), [FirstName] & " " & [LastName],
[Company])
-- Why are my names not coming through, even though all the other
information is sorted.
kae
 
C

carrie08

I'm sorry. This formula may have worked if I had attached Contact to the
beginning of the FirstName, LastName, expressions.
Thanks
--
kae


John Spencer said:
Try testing for Null and zero-length strings

Contact Name: IIF(IsNull([Company]) or [Company]="", [FirstName] & " " &
[LastName], [Company])


Or simpler
Contact Name: IIF([Company] & "" = "",[FirstName] & " " & [LastName] ,[Company])


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I need to concatenate FirstName and LastName columns into one field for a
calculated column. The formula that I am using is not showing my names in the
column even though I have the show box checked. This is my formula:

Contact Name: IIF(IsNull([Company]), [FirstName] & " " & [LastName],
[Company])
-- Why are my names not coming through, even though all the other
information is sorted.
kae
 

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