Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove a leading space in a field 2

Status
Not open for further replies.

scottian

Programmer
Jul 3, 2003
955
GB
Ive got a spreadsheet, which users add records to, which i import into access, when its in i group all the records based on certain fields. but the users are a bit sloppy and sometimes add details with leading spaces, but then someone else might add the same details but pay more attention to what they are doing and dont include the leading space i.e.
Sloppy = ' 128 HELE ROAD'
Attentive = '128 HELE ROAD'
So when i come to group the records the query treats them as different.
Does anyone know how to remove these spaces from the fields?

"Children are smarter than any of us. Know how I know that? I don't know one child with a full time job and children."...Bill Hicks
 
This could be done in an update query with SQL like:
Code:
UPDATE [tblNoNameGiven]
SET [SomeField]= Trim([SomeField])

Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Thanks very much, problem solved.

"Children are smarter than any of us. Know how I know that? I don't know one child with a full time job and children."...Bill Hicks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top