
parsing name field into first and last discarding middle initial
What version of Access?
You can use Instr to find the first space and that should work to get you the
first name.
But, I see problems with names such as
Mary Anne Van Hooten
Robert R. Jones
Robert R Jones (No Period)
James Earl Jones
If your names are consistently entered (good luck there) then you can write a
VBA routine to parse this into parts. In Access 2K and later you can take
advantage of the Split function to break the name field into parts based on a
space. Look up Split function in the Visual Basic Help.
Dim asNameParts(0) as string
asNameParts = Split([FullName]," ")
Then use the array functions to get the size of the array (Lbound, Ubound), and
examine the various parts to determine First Name; middle initial (if any), Last
Name
Quote:
> Help anyone?
> I need proceedure or query that parses a name field into first and last,
> checking for a single charecter intitial in middle and discarding it.
> thanx bunches
> james