General discussion
March 4, 2002 at 03:23 AM
chainsawz

Extract a text string – Access 97

by chainsawz . Updated 24 years, 6 months ago

Extract a text string – Access 97

In Access 97, I have a name field, which contains first name and sometimes middle initial.
Example: John P.
Mary J.
George
Sue
I use this expression to separate the middle initial into another field:
Middle Initial: IIf(InStr(InStr([TODAY].[FIRST NM],” “)+1,[TODAY].[FIRST NM],””)<>1,Right([TODAY].[FIRST NM],Len([TODAY].[FIRST NM])-InStr(InStr([TODAY].[FIRST NM],””)+1,[TODAY].[FIRST NM],” “)),””)

I can’t seem to get this to work to create a separate field for the first name. Help?!

This discussion is locked

All Comments