Splitting Name field into first name and Last name...URGENT

J

Jim/Chris

This is for the query

In the table containing the field with the full name in it,
add two new fields: LastName and FirstName

In an UpdateQuery, on the Update To: row for firstName,
insert the following:

Left([FullName], InStr([FullName], ",") - 1)

On the Update To: row for lastName, insert the following:

Mid([FullName], InStr([FullName], ",") + 1)

Jim

-----Original Message-----
OK, I have did a searched on this and found many results
on how to do this but cannot seem to get this to work. I
have a database with a field named attendeename I need to
split the names into first name and last name fields. It
is formatted as below:
John Doe
Jane Doe
etc.

I did find the code below which should preform the function

FirstName:Left([attendeename],InStr([attendeename]," ")-1)
LastName:Mid([attendeename],InStr([attendeename]," ")+1)

But I am lost as to where I need to incorporate this code,
in an update querie? Idealy I would like the data to be
stored in the original table in the new field named first
name and last name. But I can work with a create table
query as well.
 

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