Splitting Text Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I link to a network shared .dbf file. One of the fields stores individuals
names. When the .dbf is refreshed, I append that field data to a table in
Access.

What I would like to do is separate field text from original linked table
into the Access table to have last name, first name, middle, etc. separated
so I can format system-generated correspondence more professionally.

Example data in linked table field (call in NAME):
BROWN JOE JOHN GEORGE III (sometimes I have names with 2 middle names)

Desired results:
LNAME (field) FNAME (field) MNAME (field) MNAME2 (FIELD) SUFFIX (field)

if it's too complicated I can even ignore middle name(s) and suffix and only
go with first and last names.
 
The family of string functions can help you.
See Left, Right, Mid, Instr, and Len in the Help file for more info.

intPos = instr(Namefield, " ")
strLName = Left$(Namefield, intPos-1)

InfoPlan has a product called Nameparser that's pretty handy as well.
http://www.infoplan.com.au/nameparser/

Tell 'em I sent ya.
 
Back
Top