Concatenate Names

D

Dermot

How do I insert a comma between the mames in the following query.
WholeName: [LastName] & " " & [FirstName]

Doesn't work 1:- WholeName: [LastName], & " " & [FirstName].....??

Doesn't work 2:- WholeName: [LastName]","[FirstName]...............????

I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])
 
K

KARL DEWEY

Try this --
WholeName: [LastName] & ", " & IIf([MiddleName] Is Null, [FirstName],
[FirstName] & " " & [MiddleName])
 
D

Dermot

Thanks Karl, but that doesn't do what I want either.
It gives the parametr Option to enter a middle name.....although this could
be quite nice to have.
Can you answer the rest of my original posting Karl? it's jus that I would
like to create the queries as I go as caampared with, referring to examples.

KARL DEWEY said:
Try this --
WholeName: [LastName] & ", " & IIf([MiddleName] Is Null, [FirstName],
[FirstName] & " " & [MiddleName])

Dermot said:
How do I insert a comma between the mames in the following query.
WholeName: [LastName] & " " & [FirstName]

Doesn't work 1:- WholeName: [LastName], & " " & [FirstName].....??

Doesn't work 2:- WholeName: [LastName]","[FirstName]...............????

I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])
 
K

Keri in Vermont

WholeName: [LastName] & ", " & [FirstName]
inside the "" is a comma then a space
 
K

KARL DEWEY

I thought you had a middle name field.

Re-state your question, it seems to have gotten lost in your examples.

Dermot said:
Thanks Karl, but that doesn't do what I want either.
It gives the parametr Option to enter a middle name.....although this could
be quite nice to have.
Can you answer the rest of my original posting Karl? it's jus that I would
like to create the queries as I go as caampared with, referring to examples.

KARL DEWEY said:
Try this --
WholeName: [LastName] & ", " & IIf([MiddleName] Is Null, [FirstName],
[FirstName] & " " & [MiddleName])

Dermot said:
How do I insert a comma between the mames in the following query.
WholeName: [LastName] & " " & [FirstName]

Doesn't work 1:- WholeName: [LastName], & " " & [FirstName].....??

Doesn't work 2:- WholeName: [LastName]","[FirstName]...............????

I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])
 
D

Dermot

Thanks Keri,
It never entered my mind to include a space after the comma.

Can you help me with the other question below....
I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])

Regards
Dermot
Was this post helpful to you?
Reply



Keri in Vermont said:
WholeName: [LastName] & ", " & [FirstName]
inside the "" is a comma then a space

Dermot said:
How do I insert a comma between the mames in the following query.
WholeName: [LastName] & " " & [FirstName]

Doesn't work 1:- WholeName: [LastName], & " " & [FirstName].....??

Doesn't work 2:- WholeName: [LastName]","[FirstName]...............????

I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])
 
D

Dermot

Hi Karl,

I have seen some code for concatenating and the code is quite elaborate.
Can you explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])

Regards
Dermot


Dermot said:
Thanks Karl, but that doesn't do what I want either.
It gives the parametr Option to enter a middle name.....although this could
be quite nice to have.
Can you answer the rest of my original posting Karl? it's jus that I would
like to create the queries as I go as caampared with, referring to examples.

KARL DEWEY said:
Try this --
WholeName: [LastName] & ", " & IIf([MiddleName] Is Null, [FirstName],
[FirstName] & " " & [MiddleName])

Dermot said:
How do I insert a comma between the mames in the following query.
WholeName: [LastName] & " " & [FirstName]

Doesn't work 1:- WholeName: [LastName], & " " & [FirstName].....??

Doesn't work 2:- WholeName: [LastName]","[FirstName]...............????

I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])
 
K

KARL DEWEY

Can you explain to me how I reason the statement out
WholeName: [LastName] & ", " & IIf([MiddleName] Is Null, [FirstName],
[FirstName] & " " & [MiddleName])

Mine above assumes that there is a last and first name. I concatenates the
last name with a comma and space before checking if there is a middle name.
If there is no middle name it concatenates the first name to the last name,
comma, space combination. If there is a middle name it concatenates the
first name, space, and middle name to the last name, comma, space combination.

Does this answer your question?


Dermot said:
Hi Karl,

I have seen some code for concatenating and the code is quite elaborate.
Can you explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])

Regards
Dermot


Dermot said:
Thanks Karl, but that doesn't do what I want either.
It gives the parametr Option to enter a middle name.....although this could
be quite nice to have.
Can you answer the rest of my original posting Karl? it's jus that I would
like to create the queries as I go as caampared with, referring to examples.

KARL DEWEY said:
Try this --
WholeName: [LastName] & ", " & IIf([MiddleName] Is Null, [FirstName],
[FirstName] & " " & [MiddleName])

:

How do I insert a comma between the mames in the following query.
WholeName: [LastName] & " " & [FirstName]

Doesn't work 1:- WholeName: [LastName], & " " & [FirstName].....??

Doesn't work 2:- WholeName: [LastName]","[FirstName]...............????

I have seen some code for concatenating and the code is quite elaborate.
Cna anyone explain to me how I reason the statement out as I type the
statement.....instead of having to continually check code examples?..the
IIF????

FirstNameFirst: IIf([MiddleName],[FirstName] & " " &
[MiddleName],[FirstName]) & IIf([LastName]," " & [LastName],[LastName])
 

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