String manipulation

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

Guest

I have a single string consisting of last name, a comma, a first name and a
middle initial. I want to populate individual last name, first name and
middle initial fields. The comma is obviously the first identifier and the
space between the first name and middle initial is another identifier. What
expression do I use to populate the various fields? I'm using Access 2003.
Thank you
 
If the field is always build as you said then you can use this
split(MyName,",")(0) ' Return Last Name
split(trim(split(MyName,",")(1))," ")(0) ' Return First Name
split(trim(split(MyName,",")(1))," ")(1) 'Return middle initial
 

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

Back
Top