May 10 2012, 11:03 AM
I am trying to extract either the last character or last two characters from a text filed.
I have a text field named LocationID.
If the value in LocationID is "SEA8" I only want it to extract the "8" but if the value is "SEA12" I want it to extract "12".
Is there a way to extract only the integers from a text filed?
May 10 2012, 11:09 AM
Without knowing the entire business rule, I hope this Wiki Article works for you: GetDigitsOnly
Just my 2 cents...
May 10 2012, 12:04 PM
Is the location ID always 'SEA' then a digit? If it is, use the mid function
Mid([MyTable]![LocationID], 4, Len([MyTable]![LocationID]) -3)
May 10 2012, 12:25 PM
good thought, but unfortunately the alpha portion of the string may be 3 to 7 character. The Wiki link that TheDBguy referenced worked great.
May 10 2012, 12:26 PM
River and I are happy to help. Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here