Extracting a variable length string

DavidCon

Registered User.
Local time
Today, 09:50
Joined
Apr 14, 2011
Messages
23
Hi,

Sorry if this has been answer before, i've had a trawl through the forums but have found no solution.

I have a table in Access 2003 where i would like to extract a varable length string.

Sample data:

555555_OP/C011526.pdf
100411_75163627X.pdf
104735_9200.pdf

So in theory I would like Access to pick up any data after the underscore and before the period in ".pdf"

Any help would be fantastic as im at a loss with this.

Thanks for reading
 
x = "104735_9200.pdf"

Mid(x, InStr(x, "_") + 1, (Len(x) - InStr(x, "_") - 4))

gives you 9200

JR
 
Hi,

I can not thank you enough for this, it worked perfectly.

Thank you.
 

Users who are viewing this thread

Back
Top Bottom