Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Oct 2004
    Location
    Auckland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    strip spaces (Office XP)

    Hi, is there a way to strip a space from the front of data. in my fields i have (space)persons name in some but not all of my fields - makes my labels in my mail merge look a bit odd!



    <img src=/S/flags/NewZealand.gif border=0 alt=NewZealand width=30 height=18>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: strip spaces (Office XP)

    You can use the LTrim or Trim function in a query based on the table, and use the query as data source for the mail merge. The LTrim function removes all leading spaces, and the Trim function removes all leading and trailing spaces from a string value. (As you might guess, there is also an RTrim function.) In the query, create one or more columns like this, of course with the appropriate field name substituted:

    TrimmedName: Trim([NameField])

    If you would like to remove the spaces permanently, create a query based on your table and change it into an update query (Query | Update Query). In the "Update to" line under the NameField field, enter

    Trim([NameField])

    and repeat for other fields you want to trim, if applicable. Then run the query (Query | Run). You will be prompted that you are about to update ... records. Confirm.

  3. #3
    New Lounger
    Join Date
    Oct 2004
    Location
    Auckland
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: strip spaces (Office XP)

    Thank you once again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •