Results 1 to 2 of 2
  1. #1
    Solarlux is offline Novice
    Windows 8 Access 2007
    Join Date
    Feb 2018
    Posts
    2

    If last character of string comma remove it.


    How to make trim only when last character of string is comma remove it?

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,120
    Use
    Code:
    if right(strText,1)="," Then strText=Left(strText,Len(strText)-1)
    Where strText is the name of your text string
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Removing last Character if it is a comma
    By MTSPEER in forum Queries
    Replies: 4
    Last Post: 01-22-2018, 02:43 PM
  2. Remove First Character
    By Juan4412 in forum Queries
    Replies: 6
    Last Post: 08-06-2015, 04:49 PM
  3. update/remove character from field
    By Ruegen in forum Queries
    Replies: 6
    Last Post: 01-23-2014, 05:08 PM
  4. Replies: 2
    Last Post: 04-07-2011, 10:15 AM
  5. Replies: 1
    Last Post: 07-31-2009, 03:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums