2008-05-15, 12:46 #1
- Join Date
- Jan 2001
- 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)
Subscribe to our Windows Secrets Newsletter - It's Free!
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!
+ 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!
2008-05-15, 13:58 #2
- Join Date
- Mar 2002
- 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:
- Substitute the actual name of the field for LastName.
- Select Query | Run or click the Run button on the toolbar.