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.
 
Top