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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trim a Field?

Status
Not open for further replies.

soljb

Technical User
Jul 15, 2002
6
US
Hi Guys,
i'm an access newbie. I imported a table into access and one of the fields has some leading spaces. how do i trim them? i've tried doing it with a query and setting the putting

Fieldname: trim([field_name])

into the field box of the query, but it keeps giving me compile errors. please help! thanks!
 
What you have setup in your query is correct and, just to make absolutely sure, I have testet it here i.e.: Exp: Trim([text_tst])

and it works, as it should, just fine - so your problem lies else where.
 
So lets look for the "elsewhere"

What type of query do you have this in?

Post the entire query.



Alternativly - the entire UPDATE query as I think you need it is:-

UPDATE TableName SET TableName.FieldName = Trim([FieldName]);

Then just run the query


'ope-that-'elps.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top