I want to separate a last anme first name at a comma

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a db that I am importing. The Format is lastname,firstname. I want
to separate the name into 2 fields, lastname and first name at the comma.
How do I search for the comma and break the one filed into two?

Thanks

Dave K
 
You'll need to make use of the Left(), Mid() and InStr() functions in an
UpdateQuery. Here's how:

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

2. In an UpdateQuery, on the Update To: row for LastName, insert the
following:

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

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

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

hth,
 
Bless your heart!!

Thanks

Dave

Cheryl Fischer said:
You'll need to make use of the Left(), Mid() and InStr() functions in an
UpdateQuery. Here's how:

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

2. In an UpdateQuery, on the Update To: row for LastName, insert the
following:

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

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

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

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Dave said:
I have a db that I am importing. The Format is lastname,firstname. I want
to separate the name into 2 fields, lastname and first name at the comma.
How do I search for the comma and break the one filed into two?

Thanks

Dave K
 
You're welcome and good luck with your project.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Dave said:
Bless your heart!!

Thanks

Dave

Cheryl Fischer said:
You'll need to make use of the Left(), Mid() and InStr() functions in an
UpdateQuery. Here's how:

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

2. In an UpdateQuery, on the Update To: row for LastName, insert the
following:

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

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

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

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Dave said:
I have a db that I am importing. The Format is lastname,firstname. I want
to separate the name into 2 fields, lastname and first name at the comma.
How do I search for the comma and break the one filed into two?

Thanks

Dave K
 
Back
Top