Results 1 to 2 of 2
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)
2008-05-15, 13:58 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 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.