Results 1 to 10 of 10
  1. #1
    rudenberg2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    14

    How do put first and last name in separate fields.


    Hi, my name's Bernardo.I'm from Brazil, I don't speak english , I'm using the translate at Google. I have many names in Access and have to put the first name in a field and the second name (surname) in another field (table). How phaco this?
    Attached Files Attached Files

  2. #2
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    How do put first and last name in separate fields.

    http://www.599cd.com/tips/access/131...?key=AlexForum

    Mod edit: delete duplicate thread originally referenced and replaced link with link from duplicate thread

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Try

    SELECT Left([Names of employees], InStr([Names of employees]," ")) As FirstName, Mid([Names of employees], InStr([Names of employees]," ")+1) As LastName FROM Names;
    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
    rudenberg2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    14
    sorry but I did not understand. Where do I put this code ?

  5. #5
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    How do put first and last name in separate fields.

    @June7 has given you a SQL Statement.
    Choose "Create Query" on the Ribbon.
    There will be an icon you can dropdown on the top left, choose SQL then past this code in and press Run.

  6. #6
    rudenberg2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    14
    thank you so much. I'll follow instructions.

  7. #7
    rudenberg2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    14
    you can post the database with code to download and I understand. Thank you.

  8. #8
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    How do put first and last name in separate fields.

    Which part(s) were you struggling with?

    These screens are old but this article will be of use:
    http://office.microsoft.com/en-gb/ac...010247313.aspx


  9. #9
    rudenberg2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    14
    The code it is ok, thanks to all.

  10. #10
    rudenberg2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2013
    Posts
    14
    thank you so much, thank you so much

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

Similar Threads

  1. Custom Form Separate Fields
    By MikeDBMan in forum Forms
    Replies: 1
    Last Post: 10-10-2012, 01:09 PM
  2. Memo fields in separate tables
    By mhart in forum Database Design
    Replies: 1
    Last Post: 12-02-2011, 05:51 PM
  3. multiple fields in separate records
    By Fredo0709 in forum Database Design
    Replies: 9
    Last Post: 04-09-2010, 12:23 PM
  4. 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