Avatar of UWW_Jax
Flag for United States of America

asked on 

Extract Specific set of Number out of a text field

I'm looking for a way to add a formula based upon a module function for a query.  I have a text field which has random data.  I need to pull out a po# from the text as a separate column.  The PO# is suppose to be 8 digits long. However, sometimes depending on the source a leading 0 could get drop and be only 7.  If two sets of 7 digits are found I'd like to pull the first set only.  If the text field does not have a po# then leave null.

Field data could look like this:
1)  po# 07641235
2) 7641235
3) ref num 07641235 for cust 1234
4) sales 01235 po# 7642315 for cust 9986

I'm using access 2003.  I've tried several peices of code from the site but, no luck
Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon