Share via


Return Characters after a underscore in a Access 2010 query.

Question

Thursday, August 1, 2013 3:33 PM

I am having trouble getting the data I need here.

I have a field "USER_FIELD3" which is a String or Text field. which has the following info

EA _10

RL _250

EA _1500

I need to run a query that returns only the numbers or anything to the Right of the Underscore. I can't get the Right function to work unless i give a specific number and as you can see I may have 1 character or 4 characters depending on the conversion.

this must run in a query and not VBA

Appreciate any help.

Mike

All replies (2)

Thursday, August 1, 2013 4:03 PM ✅Answered

Use:

Mid([USER_FIELD3], InStr([USER_FIELD3],"_") + 1)

as the expression for the CalculatedField/Column in your Query to get what comes after the underscore character.

Van Dinh


Thursday, August 1, 2013 4:55 PM

It worked like a charm. I marked you as correct.

I appreciate your help.

Mike