Results 1 to 3 of 3
  1. #1
    bulbul4u is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    3

    Separate Names into Columns

    Hello Everyone,

    Currently, I have ONE column for the Last name, first name, and Middle name.
    My boss wants to have last name, first name, and the middle name in 3 different columns. How can I do that?
    The current name column has this name format (Baldwin, Sonia Laci). Where Baldwin is the lastname, sonia is the first name and Laci is the last name.

    How can I separate the names into different columns?

    Please someone help.



    Thank you,

  2. #2
    kennejd is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    188
    I created a query and use the mid/left functions in combination with instr. You may need to add some additional checking for people that don't have middle names:

    SELECT People.FName, Left([fname],InStr([fname],",")-1) AS [Last], Mid([fname],InStr([fname],",")+2) AS FirstMiddle, Left([FirstMiddle],InStr([FirstMiddle]," ")-1) AS [First], Mid([FirstMiddle],InStr([FirstMiddle]," ")+1) AS Middle
    FROM People;


    Jim

  3. #3
    bulbul4u is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    3
    thanks that worked great!!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 61
    Last Post: 03-14-2011, 03:29 AM
  2. Separate combo box
    By sanos_a in forum Access
    Replies: 1
    Last Post: 10-07-2010, 05:30 AM
  3. separate a form by months
    By graciemora in forum Forms
    Replies: 40
    Last Post: 08-19-2010, 01:46 PM
  4. Separate queries?
    By sid in forum Queries
    Replies: 0
    Last Post: 08-01-2009, 10:31 AM
  5. Separate one field into many
    By ellen in forum Programming
    Replies: 5
    Last Post: 12-22-2008, 06:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums