Results 1 to 3 of 3
  1. #1
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231

    Replacespace with underscore in a text string


    I sometimes get a last name with two names not connected by a dash (i.e. Smith-Jones), instead it is entered as "Smith Jones". When I get it from Excel into Access is there a way to replace the space with an underscore in Access? I know I can do it in Excel, but I need that Excel file the way it is for other purposes. Help please.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    LastName =Replace(lastName," ","_") untested see Replace() in Access

  3. #3
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231
    Worked perfectly.

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

Similar Threads

  1. Keycode for dash/underscore key
    By data808 in forum Access
    Replies: 2
    Last Post: 03-07-2014, 11:44 AM
  2. Replies: 5
    Last Post: 09-18-2013, 06:44 PM
  3. Replies: 3
    Last Post: 12-22-2012, 05:33 PM
  4. Text String.
    By cap.zadi in forum Queries
    Replies: 3
    Last Post: 11-08-2011, 09:30 AM
  5. text string
    By cbrsix in forum Reports
    Replies: 4
    Last Post: 10-27-2011, 02:24 PM

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