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

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
 
F

fredg

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)
 
G

Guest

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)
 
J

Jason

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)
 

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