Results 1 to 4 of 4
  1. #1
    joannakf is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    11

    Splitting First Name and Last Name into Separate Fields

    Column: SUPERNAME


    The names are either "John Doe" or "John A Doe"
    I would like to split the first and last names into separate columns, so:

    John Does becomes
    First Name: John
    Last Name: Doe

    John A Doe becomes
    First Name: John
    Last Name: Doe

    Can anyone help me with the query formula? Thank you in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    What about compound names (I just made that term up), like Mary Joe Smith or Joe Van Dyke? Generally you could use Mid() function along with the InStr() functions for the first name, Mid() and InStrRev() for the last.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Or what about: Ann Marie Alana van der Waal

    Or there is no last name: Cher

    This question has been asked numerous times. There is no general solution. Parsing text requires consistency of structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377

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

Similar Threads

  1. Replies: 5
    Last Post: 11-07-2015, 03:53 PM
  2. Replies: 6
    Last Post: 10-22-2015, 06:12 AM
  3. Replies: 1
    Last Post: 07-23-2015, 05:11 AM
  4. How to separate names into 2-separate fields
    By djclntn in forum Queries
    Replies: 4
    Last Post: 09-18-2014, 02:34 PM
  5. Splitting a field to separate fields
    By Petefured in forum Programming
    Replies: 8
    Last Post: 06-08-2009, 04:11 AM

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