Results 1 to 5 of 5

Thread: Parse ?

  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parse ?

    Hi Everyone,

    I just inherited a db with a table that has the first and last name in one field. I know the code to get the first name and the second name and put the data in separate fields but I don't know the code to just extract the first letter of each name...can someone please help?

    Thanks in advance.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Winnipeg, Canada
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parse ?

    Try: Left(rst.Fields("fieldname"),1)

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parse ?

    Thanks for the quick reply...
    I tried your suggestion and it returned an error...
    I tried the following and it returned the first Initial, but I still don't know how to get the second?

    Initials: Left([FullName],1)

    Again, Thanks
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parse ?

    Hi Roberta: [img]/w3timages/icons/smile.gif[/img]
    In your first post you indicated you were able to extract First and Last name to different fields. If that's the case, run the Left function against each of those fields, i.e.
    FirstInit = Left([FirstName],1)
    LastInit = Left([LastName],1)
    or
    Initials = Left([FirstName],1)&Left([LastName],1)

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parse ?

    Brian,

    Thanks, I, just before I read your reply, did just that.

    Thanks
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •