Simple Concatenation Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query to combine First Middle and Last name:
FullName: Table!First+" "+Table!Middle+" "+Table!Last.

This works if someone has all 3 (First, Middle and Last) names, BUT WONT
display any name at all If someone doesnt have a middle initial. For these
people, i would like it to show a First and Last name only.

Thank you!
 
Works perfectly. Thank you.

KARL DEWEY said:
Try this --

FullName:
.[First]+IIF(
.[Middle] Is Null,"","
"+
.[Middle]) +" "+
.[Last]


kayabob said:
I have a query to combine First Middle and Last name:
FullName: Table!First+" "+Table!Middle+" "+Table!Last.

This works if someone has all 3 (First, Middle and Last) names, BUT WONT
display any name at all If someone doesnt have a middle initial. For these
people, i would like it to show a First and Last name only.

Thank you!
 
You may also try the following, which (according to my tests) will keep the
text left-aligned and properly spaced regardless of which field(s) may be
empty.

MoneyBags: Trim((PerFirst+" ") & ( PerMiddle + " ") & (PerLast))

HTH,
Brian

kayabob said:
Works perfectly. Thank you.

KARL DEWEY said:
Try this --

FullName:
.[First]+IIF(
.[Middle] Is Null,"","
"+
.[Middle]) +" "+
.[Last]


kayabob said:
I have a query to combine First Middle and Last name:
FullName: Table!First+" "+Table!Middle+" "+Table!Last.

This works if someone has all 3 (First, Middle and Last) names, BUT WONT
display any name at all If someone doesnt have a middle initial. For these
people, i would like it to show a First and Last name only.

Thank you!
 
Back
Top