Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    removing spacebar hits in a query (Access 2003)

    I need to remove in a query when a user uses the space bar after keying in data in a form. I'm linking to the data from another source so I can't control how the user enters the data. Bascially what the user is doing is keying in their name then hitting the space bar multiple times before they exit the field. Is there any way I can strip off the space bar keystrokes in my query so I can easily match the data up with out having to worry about the spacebar hits?

    Pingssssssss (sample record where the letter s is where they hit the space bar it can vary how many times it is hit)

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

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

    Re: removing spacebar hits in a query (Access 2003)

    Normally, Access automatically strips away trailing spaces during data entry, so I don't understand how the spaces come to be preserved.

    However, you can create an update query to remove them:
    - Create a query based on the table.
    - Add the name field. Let's say it is called LastName.
    - Select Query | Update Query.
    - Enter the following expression in the Update to line that appears:

    Trim([LastName])

    - Substitute the actual name of the field for LastName.
    - Select Query | Run or click the Run button on the toolbar.

Posting Permissions

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