Find data in field after a specific character & display specific d

S

Steve

I have a field in a table with text and numbers. The numbers are always at
the end of the data and in the format of (453), (090), (361), (100) etc.

I want to display the numbers only eg. 453, 090, 361, 100 etc. I have used
Mid([Myfield],Instr([Myfield],"(")+1) which results in 453), 090), 361), 100)
etc.

Can I get rid of the end curly bracket by amending my above argument somehow.


Cheers
Steve Barnes
 
K

kc-mass

Hi Steve,

Try the following:

Replace(Mid([Myfield],Instr([Myfield],"(")+1,")","")


Regards

Kevin
 
J

John Spencer MVP

If the numbers are always 3 characters then add length argument to the MID

Mid([Myfield],Instr([Myfield],"(")+1,3)

If the length varies, then use the replace function to replace the ")" or use
the LEFT function to remove the last character

That would look like
Replace(Mid([Myfield],Instr([Myfield],"(")+1),")","")

or like this
Left(Mid([Myfield],Instr([Myfield],"(")+1),Len(Mid([Myfield],Instr([Myfield],"(")+1))-1)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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