Concatenate String

  • Thread starter Thread starter mj
  • Start date Start date
M

mj

Hi. I have a table with a field called SALES_REP that
lists first initial and last name. It looks like this:

M JONES
C SMITH

I'm trying to create first initial and last name fields. I
can get the first initial with this:

REPFIRST: Trim(Left([SALES_REP],1))

but I'm not sure how to get the last name. Any suggestions
would be great. Thanks!
 
Hi. I have a table with a field called SALES_REP that
lists first initial and last name. It looks like this:

M JONES
C SMITH

I'm trying to create first initial and last name fields. I
can get the first initial with this:

REPFIRST: Trim(Left([SALES_REP],1))

but I'm not sure how to get the last name. Any suggestions
would be great. Thanks!

Try:

REPLAST: Mid([SALES_REP], instr([SALES_REP]," ")+1)
 
Perfect! Thanks, Doug.
-----Original Message-----
Trim(Mid([SALES_REP], InStr([SALES_REP], " ") + 1))

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Hi. I have a table with a field called SALES_REP that
lists first initial and last name. It looks like this:

M JONES
C SMITH

I'm trying to create first initial and last name fields. I
can get the first initial with this:

REPFIRST: Trim(Left([SALES_REP],1))

but I'm not sure how to get the last name. Any suggestions
would be great. Thanks!


.
 
Back
Top