Results 1 to 4 of 4
  1. #1
    fuecheefang is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    43

    creating a query to separate this name????

    I need a query to breakdown this name..

    Dietz C. (AP) [C] to Dietz C
    O'Brien N. NEW [C] to O'Brien N
    Brown Matt Office [C] to Brown M

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Try this query:
    Code:
    SELECT NameTest.Fullname, Left([fullname],InStr(1,[fullname]," ")+1) AS Expr1
    FROM NameTest;
    Change "NameTest" to your table name and "Fullname" to your field name.


    Fullname (Input)
    Expr1 (Output)
    Dietz C. (AP) [C] Dietz C
    O'Brien N. NEW [C] O'Brien N
    Brown Matt Office [C] Brown M
    #Error

  3. #3
    fuecheefang is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    43
    Thanks ssanfu, it worked perfectly. I got confused and created the left and right function in one query and was giving me issues.



    Fullname (Input)
    Expr1 (Output)
    Dietz C. (AP) [C] Dietz C
    O'Brien N. NEW [C] O'Brien N
    Brown Matt Office [C] Brown M
    #Error
    [/QUOTE]

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Happy to help...

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

Similar Threads

  1. Replies: 3
    Last Post: 03-21-2016, 01:21 AM
  2. How to separate names into 2-separate fields
    By djclntn in forum Queries
    Replies: 4
    Last Post: 09-18-2014, 02:34 PM
  3. Replies: 5
    Last Post: 07-18-2014, 02:04 AM
  4. Replies: 12
    Last Post: 12-14-2011, 08:04 PM
  5. Creating a new MDB for separate databases?
    By SandyClark in forum Import/Export Data
    Replies: 1
    Last Post: 06-02-2011, 10:44 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