Split name

  • Thread starter Thread starter John
  • Start date Start date
J

John

How do you split a name such as Doe, John into seperate firstname and
lastname fields.
Thanks
 
John said:
How do you split a name such as Doe, John into seperate firstname and
lastname fields.
Thanks

For starters you should check to see just how consistent the names are.
Does each name have "LASTNAME, FIRSTNAME" or do some have middle names or
middle initials, are some first name last name, do those use a "," how
about those that may only have a first or last name.

If they are consistent, not as big a problem. If they are inconsistent,
it is a larger problem.
 
For starters you should check to see just how consistent the names are.
Does each name have "LASTNAME, FIRSTNAME" or do some have middle names or
middle initials, are some first name last name, do those use a "," how
about those that may only have a first or last name.

If they are consistent, not as big a problem. If they are
inconsistent, it is a larger problem.

Dude, and this is only scratching the surface. Justwait till he gets a name
like this:

"ATTN Mr Maj Gen. Robert (Bob) Stevens van ter Hoffen-Schlager Sr. MD"
 
How do you split a name such as Doe, John into seperate firstname and
lastname fields.
Thanks

If all of the names are exactly as you have written...

Lastname:Left([FullName],InStr([FullName],",")-1)
Firstname:Mid([FullName],Instr([FullName],",")+2)
 
John said:
How do you split a name such as Doe, John into seperate firstname and
lastname fields.
Thanks

John, you can use the following calculation expressions below. After running
the queries make sure you check the results where the fullname field has no
comma (,) since that will be the exception to the rule.

'Extract Lastname for given field types like "Lastname, Firstname"
=Trim(Left([Field], Instr([Field], ",")-1))

'Extract Firstname for given field types like "Lastname, Firstname"
=Trim(Mid([Field], Instr([Field], ",")+1))

Left

-Randy
 
John said:
How do you split a name such as Doe, John into seperate firstname and
lastname fields.
Thanks

John, you can use the following calculation expressions below. After running
the queries make sure you check the results where the fullname field has no
comma (,) since that will be the exception to the rule.

'Extract Lastname for given field types like "Lastname, Firstname"
=Trim(Left([Field], Instr([Field], ",")-1))

'Extract Firstname for given field types like "Lastname, Firstname"
=Trim(Mid([Field], Instr([Field], ",")+1))

Left

-Randy
 

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

Similar Threads


Back
Top