Extracting data from field

  • Thread starter Thread starter Alex Hammerstein
  • Start date 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
 
If Len([fieldname]) >= 11 Then
Msgbox Mid([fieldname],8,(Len([fieldname]) - 8 - 4) + 2)
End If
 
Back
Top