Extracting data from field

  • Thread starter Alex Hammerstein
  • Start date
A

Alex Hammerstein

Hi
I need to extract some data from the middle of a field. Starting at
position 8 and ending at 4 characters from the end.

I can do the start bit using the mid ([fieldname],8 but am not sure how to
calculate the last parameter so that it stops 4 characters from the end.

Any help much appreciated

Thanks
Alex
 
R

RonaldoOneNil

If Len([fieldname]) >= 11 Then
Msgbox Mid([fieldname],8,(Len([fieldname]) - 8 - 4) + 2)
End If
 

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