Instr Function Question

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
 
P

PC Datasheet

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top