split a field in two

B

Brian L

I want to split field in two before and after a carat (^). Problem is, I
can't use Left or Right trim because num of characters is always diff. Any
ideas? Perhaps Mid?

22451^Jones Incorporated
 
F

fredg

I want to split field in two before and after a carat (^). Problem is, I
can't use Left or Right trim because num of characters is always diff. Any
ideas? Perhaps Mid?

22451^Jones Incorporated

LeftPart:Left([Fullfield],InStr([FullField],"^")-1)
RightPart:Mid([Fullfield],InStr([FullField],"^")+1)
 
A

Alberto G

Brian try this

ex. Tomorrow^afternoon

Left([FieldName],InStr([FieldName],"^")-1) this will give you "Tomorrow"

Mid([FieldName],InStr([FieldName],"^")+1) this will give you "afternoon"
 

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