Query for NAMES first/last

  • Thread starter Thread starter SDIrby
  • Start date Start date
S

SDIrby

Good day all,
This is my question: I have 2 tables with thousands of loans an
borrower names and too much more information to mention. What i'
wondering is; can a query be written to pull the borrower name an
split it up betweeen the corresponding fields. Basically i want to g
from this table field: Borrower Name and divide it up by Borrower Firs
name: Borrower Last Name:

EXAMPLE:

Borrower Name:Bush George W (This is how it is now)

into two separate fields

Borrower First name:George
Borower Last name: Bush

This would be much faster than rekeying however many there are
(Several several thousand)

If there is a possible way to do this please let me know. Do i searc
the field for the first "space" and then stop or what, i am not overl
familiar with the VBA but i do alright. Please advise
 
Good day all,
This is my question: I have 2 tables with thousands of loans and
borrower names and too much more information to mention. What i'm
wondering is; can a query be written to pull the borrower name and
split it up betweeen the corresponding fields. Basically i want to go
from this table field: Borrower Name and divide it up by Borrower First
name: Borrower Last Name:

EXAMPLE:

Borrower Name:Bush George W (This is how it is now)

into two separate fields

Borrower First name:George
Borower Last name: Bush

This would be much faster than rekeying however many there are.
(Several several thousand)

If there is a possible way to do this please let me know. Do i search
the field for the first "space" and then stop or what, i am not overly
familiar with the VBA but i do alright. Please advise.

It's certainly possible, with some warnings (below).

Add your first and last name fields to the table. Then run an Update
query updating [Borrower Last Name] to

Left([Borrower Name], InStr([Borrower Name], " ") - 1)

and [Borrower First Name] to

Mid([Borrower Name], InStr([Borrower Name], " ") + 1)

The caveats: not all last names are one word. If you have

Van Slyke Dennis

as a borrower, he'll be incorrectly entered as Mr. Van, first name
Slyke Dennis. You should do a search for people named Van, Von, De,
La, Le and other such common prefixes, and fix them up manually.
 
Back
Top