MID function

B

Brian L

Hello. I am sure this is easy but could not get the syntax right

I need to alter the results of a field in a query so that unneccessary info
is not shown. The fields in question are seperated by a carat ^ and are
variable length. So if I queried the name field, it would return
)07455^Catskill or 33335^Hollywood. How is it possible to remove the ^ and
any preceeding code?
 
D

Dirk Goldgar

Brian L said:
Hello. I am sure this is easy but could not get the syntax right

I need to alter the results of a field in a query so that
unneccessary info is not shown. The fields in question are seperated
by a carat ^ and are variable length. So if I queried the name field,
it would return )07455^Catskill or 33335^Hollywood. How is it
possible to remove the ^ and any preceeding code?

Thus returning "Catskill" or "Hollywood"? Try this:

Mid([TheField], InStr([TheField], "^") + 1)
 
B

Brian L

Thanks Dirk. That worked perfectly.

Dirk Goldgar said:
Brian L said:
Hello. I am sure this is easy but could not get the syntax right

I need to alter the results of a field in a query so that
unneccessary info is not shown. The fields in question are seperated
by a carat ^ and are variable length. So if I queried the name field,
it would return )07455^Catskill or 33335^Hollywood. How is it
possible to remove the ^ and any preceeding code?

Thus returning "Catskill" or "Hollywood"? Try this:

Mid([TheField], InStr([TheField], "^") + 1)

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Top