Parse Name

  • Thread starter Thread starter Lisa W.
  • Start date Start date
L

Lisa W.

I have a field that contains last name but includes parenthesis, in which I
would like to remove. Ex. (Keller).

How can I remove the parenthesis on each side?

Thanks in Advance,
Lisa W.
 
I am a novice. However I would try an action query using the Left and Right
functions. I am sure someone better will give you a better answer and we can
both learn.
 
Thanks OldGuy! :-)

OldGuy said:
I am a novice. However I would try an action query using the Left and Right
functions. I am sure someone better will give you a better answer and we can
both learn.
 
There is a replace function:

expr1: replace([yourfield], "(", "")

expr2: Replace([expr1],")","")

Whether you can replace both parenthesis at the same time, I wouldn't be too
sure.
 
Thanks! I'll try this. I tried replacing both and it didn't work so, I'll
give this a try.

Lisa W.

scubadiver said:
There is a replace function:

expr1: replace([yourfield], "(", "")

expr2: Replace([expr1],")","")

Whether you can replace both parenthesis at the same time, I wouldn't be too
sure.


OldGuy said:
I am a novice. However I would try an action query using the Left and Right
functions. I am sure someone better will give you a better answer and we can
both learn.
 
Here is how to replace them both in one expression:
replace(replace([yourfield],"(",""),")","")
--
Dave Hargis, Microsoft Access MVP


Lisa W. said:
Thanks! I'll try this. I tried replacing both and it didn't work so, I'll
give this a try.

Lisa W.

scubadiver said:
There is a replace function:

expr1: replace([yourfield], "(", "")

expr2: Replace([expr1],")","")

Whether you can replace both parenthesis at the same time, I wouldn't be too
sure.


OldGuy said:
I am a novice. However I would try an action query using the Left and Right
functions. I am sure someone better will give you a better answer and we can
both learn.

:

I have a field that contains last name but includes parenthesis, in which I
would like to remove. Ex. (Keller).

How can I remove the parenthesis on each side?

Thanks in Advance,
Lisa W.
 
Need More help....

The last suggestion works, but when I uncheck Expr1 in the query design,
because I don't want that as part of my query results, I get a prompt
[myfield].

How can I resolve this?
 
Klatuu,

THANKS SO MUCH!!! That did it!

Lisa W.

Lisa W. said:
Need More help....

The last suggestion works, but when I uncheck Expr1 in the query design,
because I don't want that as part of my query results, I get a prompt
[myfield].

How can I resolve this?

Lisa W. said:
I have a field that contains last name but includes parenthesis, in which I
would like to remove. Ex. (Keller).

How can I remove the parenthesis on each side?

Thanks in Advance,
Lisa W.
 
Glad I could help. Please mark the question as answered so others with a
similar question will find it easily.
--
Dave Hargis, Microsoft Access MVP


Lisa W. said:
Klatuu,

THANKS SO MUCH!!! That did it!

Lisa W.

Lisa W. said:
Need More help....

The last suggestion works, but when I uncheck Expr1 in the query design,
because I don't want that as part of my query results, I get a prompt
[myfield].

How can I resolve this?

Lisa W. said:
I have a field that contains last name but includes parenthesis, in which I
would like to remove. Ex. (Keller).

How can I remove the parenthesis on each side?

Thanks in Advance,
Lisa W.
 
If you only have one set of parens and ALWAYS want to remove them

Field: LN: Replace(Replace([LastName],"(",""),"(","")



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Back
Top