A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Concatenate



 
 
Thread Tools Display Modes
  #1  
Old October 7th, 2009, 09:04 PM posted to microsoft.public.access.queries
carrie08
external usenet poster
 
Posts: 20
Default Concatenate

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
  #2  
Old October 7th, 2009, 09:52 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Concatenate

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

  #3  
Old October 7th, 2009, 10:21 PM posted to microsoft.public.access.queries
carrie08
external usenet poster
 
Posts: 20
Default Concatenate

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


"John Spencer" wrote:

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


  #4  
Old October 7th, 2009, 10:40 PM posted to microsoft.public.access.queries
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Concatenate

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" wrote in message
...
No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


"John Spencer" wrote:

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




  #5  
Old October 7th, 2009, 10:52 PM posted to microsoft.public.access.queries
carrie08
external usenet poster
 
Posts: 20
Default Concatenate

No, that doesn't work.
--
kae


"Gina Whipp" wrote:

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" wrote in message
...
No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


"John Spencer" wrote:

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




  #6  
Old October 7th, 2009, 11:01 PM posted to microsoft.public.access.queries
carrie08
external usenet poster
 
Posts: 20
Default Concatenate

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" wrote:

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" wrote in message
...
No, neither of those combinations worked. I thought Excel was hard, but
Access is worse.
--
kae


"John Spencer" wrote:

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




  #7  
Old October 7th, 2009, 11:07 PM posted to microsoft.public.access.queries
carrie08
external usenet poster
 
Posts: 20
Default Concatenate

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" wrote:

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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.