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!

Trimming Field with Variable Lengths 1

Status
Not open for further replies.

shortamericano

Programmer
Aug 7, 2007
10
US
Hello Forum,

I have a field called "Locations" that returns data in the following fashion:

Head,
Head, Leg,
Arm,
Head, Arm, Leg, Torso,

I am trying to create an expression that will trim the comma at the end of the data. The "Trim" function removes spaces but not characters. Does anybody know of a way to do this?

Thank you very much in advance! You all have been such a great help in the past. :)
 
If the last character is always the comma, you can use an expression like:
Left(Locations, Len(Locations) -1)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks for your reply dhookom! After I made a small adjustment to account for null values, it worked like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top