Instr Function Question

  • Thread starter Thread starter Salisha Khan
  • Start date Start date
S

Salisha Khan

Hello everyone,
This should be an easy one, but i think i am just brain dead today. I have
this field in Access97 named Full_Name. It is set up as Last Name, MI, Full
Name. How would I go about breaking down Full_name into 3 separate fields
(last, middle, first) . I think i have to use the Instr function, but i'm
drawing a blank. Please help. Thanks in advance.
Salisha
 
Doing what you want requires that the Full_Name be consistent in ALL records:
1. Every record has a MI
2. Last Name is followed by a comma and a space
3. MI is followed by a comma and a space


Last = Left([Full_Name],InStr([Full_Name],",")-1)
Middle = Mid([Full_Name],InStr([Full_Name],",")+2,1)
First = Mid([Full_Name],InStr([Full_Name],",")+5)
 
Back
Top