stripping off info after last common

B

bird lover

I work in access 2003 and am not a programmer nor familiar with basic. In
field [clients], the following information appears in different records.

Michael P. Lagatta, Et. Al.

W & C Auto, Inc., Et. Al.

I would like to create an update query to search for the end of the data,
then go backwards looking for the comma, then strip off the comma and
everything after that. Help with syntax would be appreciated. Wandering in
ignorance, and looking at posts, I think it has something to do with mid, or
left or right, but I still can't get it right.
 
D

Douglas J. Steele

By "strip off the comma and everything after that", I'm assuming all you
want is Michael P. Lagatta and W & C Auto, Inc.

Left([StringBeingSearched], InStrRev([StringBeingSearched], ",") - 1)
 
B

bird lover

It worked perfectly. Thanks.

Douglas J. Steele said:
By "strip off the comma and everything after that", I'm assuming all you
want is Michael P. Lagatta and W & C Auto, Inc.

Left([StringBeingSearched], InStrRev([StringBeingSearched], ",") - 1)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


bird lover said:
I work in access 2003 and am not a programmer nor familiar with basic. In
field [clients], the following information appears in different records.

Michael P. Lagatta, Et. Al.

W & C Auto, Inc., Et. Al.

I would like to create an update query to search for the end of the data,
then go backwards looking for the comma, then strip off the comma and
everything after that. Help with syntax would be appreciated. Wandering
in
ignorance, and looking at posts, I think it has something to do with mid,
or
left or right, but I still can't get it right.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top