Results 1 to 3 of 3
  1. #1
    tmcrouse is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    169

    Trim in middle of string

    I have a series of multiple strings that have additional spaces in various areas and I am trying to figure out how to get rid of them. An example of one is:



    Are you aware that you have any of the following conditions?

    There are two spaces between following and conditions and I would like to have it look like a normal sentence. So removing the one space.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Have you looked at the Replace() function?

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    You can replace(yourstring," "," ") change 2 contiguous spaces to one.


    Geez Allan, you're 2 time zones after me and you still beat me to the keyboard....
    Hope things are all set for Christmas. We have no snow and temp is expected to be 10C(50F) here on Christmas eve.
    Have a good one!

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

Similar Threads

  1. Select from Middle of Data
    By mohanmoni in forum Queries
    Replies: 2
    Last Post: 02-04-2015, 12:59 PM
  2. Parsing Middle of String
    By OprEowyn in forum Queries
    Replies: 4
    Last Post: 02-20-2013, 10:53 PM
  3. Replies: 3
    Last Post: 05-08-2011, 12:55 PM
  4. More than one middle name
    By vorstopzolder in forum Access
    Replies: 5
    Last Post: 02-10-2011, 01:09 AM
  5. how select middle characters on string ???
    By ayman.maher in forum Queries
    Replies: 1
    Last Post: 04-27-2010, 09:29 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