I have been using the following public function in my query which both PHV and Golom had shared with me back in 2009. Thread 701-1577313
GetBPName = Split(Split(Split(Split(myfield & "", " ")(0), "_")(0), "-")(0), ".")(0)
Function Sample Data Current Result
GetBPName(B15722.pdf ) = B15722
GetBPName(B16728D Outline.pdf ) = B16728D
GetBPName(B15452A Outline 3AO-948.pdf) = B15452A
GetBPName(2343900- Outline 3ZO-996.pdf) = 2343900
GetBPName(A2343900AC- Outline 8RU-696.pdf) = A2343900AC
I would like to modify the above function or call a second function so as to be able to insert the word “ Rev “ between the last number and first letter when a letter or letters follow the numbers and when there is no ending letter or letters then just leave it alone.
Sample… Desired result.
B15722 = B15722
B16728D = B16728 Rev D
B15452A = B15452 Rev A
2343900 = 2343900
A2343900AC = A2343900 Rev AC
Thanks,
uncleG
GetBPName = Split(Split(Split(Split(myfield & "", " ")(0), "_")(0), "-")(0), ".")(0)
Function Sample Data Current Result
GetBPName(B15722.pdf ) = B15722
GetBPName(B16728D Outline.pdf ) = B16728D
GetBPName(B15452A Outline 3AO-948.pdf) = B15452A
GetBPName(2343900- Outline 3ZO-996.pdf) = 2343900
GetBPName(A2343900AC- Outline 8RU-696.pdf) = A2343900AC
I would like to modify the above function or call a second function so as to be able to insert the word “ Rev “ between the last number and first letter when a letter or letters follow the numbers and when there is no ending letter or letters then just leave it alone.
Sample… Desired result.
B15722 = B15722
B16728D = B16728 Rev D
B15452A = B15452 Rev A
2343900 = 2343900
A2343900AC = A2343900 Rev AC
Thanks,
uncleG