Split a full name field (comma separated) into two fields

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

Guest

Hello,

I need to take a field that contains a full name in the LastName, FirstName
format, and separate it into two separate first and last name fields. Can
someone stear me in the right direction for this? I know I saw it in the
help files once, but I can't seem to find it now.

Thank You,
Lisa
 
Hello,

I need to take a field that contains a full name in the LastName, FirstName
format, and separate it into two separate first and last name fields. Can
someone stear me in the right direction for this? I know I saw it in the
help files once, but I can't seem to find it now.

Thank You,
Lisa

If the names are always in that order, then:

LastName:Left([FullName],InStr([FullName],",")-1)
FirstName:Mid([FullName],InStr([FullName],",")+2)
 
Thank you Fred, that looks exaclty like what I need. I saw that in my
research, but it seemed like using left() and mid() you would have to
explicitly the number of characters to copy.

Lisa

fredg said:
Hello,

I need to take a field that contains a full name in the LastName, FirstName
format, and separate it into two separate first and last name fields. Can
someone stear me in the right direction for this? I know I saw it in the
help files once, but I can't seem to find it now.

Thank You,
Lisa

If the names are always in that order, then:

LastName:Left([FullName],InStr([FullName],",")-1)
FirstName:Mid([FullName],InStr([FullName],",")+2)
 
Nice and succint. Good post!

fredg said:
Hello,

I need to take a field that contains a full name in the LastName, FirstName
format, and separate it into two separate first and last name fields. Can
someone stear me in the right direction for this? I know I saw it in the
help files once, but I can't seem to find it now.

Thank You,
Lisa

If the names are always in that order, then:

LastName:Left([FullName],InStr([FullName],",")-1)
FirstName:Mid([FullName],InStr([FullName],",")+2)
 
Back
Top