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  

Expressions



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2010, 12:03 PM posted to microsoft.public.access.queries
Amin
external usenet poster
 
Posts: 181
Default Expressions

i want to write an expressions to concatenate these three things,

Title,Last Name, First Name
Contact Name: IIf(IsNull([Last Name]),IIf(IsNull([First
Name]),[Company],[First Name]),IIf(IsNull([First Name]),[Last Name],[First
Name] & " " & [Last Name]))

i want to store the names with the title first
  #2  
Old April 29th, 2010, 04:33 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Expressions

I think that you are making it too difficult. Also I don't see Title but do
see Company. Anyway try something like this instead:

Contact Name: Trim([Title] & " " & [First Name] & " " & [Last Name])
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Amin" wrote:

i want to write an expressions to concatenate these three things,

Title,Last Name, First Name
Contact Name: IIf(IsNull([Last Name]),IIf(IsNull([First
Name]),[Company],[First Name]),IIf(IsNull([First Name]),[Last Name],[First
Name] & " " & [Last Name]))

i want to store the names with the title first

  #3  
Old April 29th, 2010, 04:46 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Expressions

Amin wrote:

i want to write an expressions to concatenate these three things,

Title,Last Name, First Name
Contact Name: IIf(IsNull([Last Name]),IIf(IsNull([First
Name]),[Company],[First Name]),IIf(IsNull([First Name]),[Last Name],[First
Name] & " " & [Last Name]))


Does this do what you want?

Contact Name: IIf(IsNull([Last Name]),IIf(IsNull([First
Name]),[Company],[First Name]),Title & " " &
IIf(IsNull([First Name]),[Last Name],[First
Name] & " " & [Last Name]))

--
Marsh
MVP [MS Access]
 




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:55 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.