Remove only the last comma

Discussion in 'Access General' started by Garry, Apr 24, 2013.

  1. Garry

    Garry Guest


    I need to remove or replace with "" only the last comma in a field

    from: Bill, John, Matt, Fred,

    to : Bill, John, Matt, Fred

    Any help would be appreciated, have tried Replace([Field],"*,","") but no

    Garry, Apr 24, 2013
    1. Advertisements

  2. Garry

    Puppet_Sock Guest

    You might find the function InStrRev() helpful.
    In combination with the functions Len(), Left(),
    and Right(), you may be able to do what you need.
    Puppet_Sock, Apr 24, 2013
    1. Advertisements

  3. Replace doesn't recognize wildcards, only literal text.

    I'd suggest updating the field to

    Left([fieldname], Len([fieldname]) - 1)

    where [fieldname] LIKE "*,"

    since the LIKE operator does use wildcards.

    John W. Vinson [MVP]
    Microsoft's replacements for these newsgroups:
    and see also
    John W. Vinson, Apr 24, 2013
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.