Welcome to the forum.....
You didn't provide field names, table name, form name or a dB, so I made up an example dB using my (not so good) names.
Since you only wanted the last "U" number in an entry, the query would look something like
Code:
SELECT iubrownie.PossibleCombinations, IIf(IIf(InStrRev([PossibleCombinations],"U")>0,Mid([PossibleCombinations],InStrRev([PossibleCombinations],"U"),3),"x")="U" & [forms]![Form7].[text0],1,0) AS Expr1
FROM iubrownie
WHERE (((IIf(IIf(InStrRev([PossibleCombinations],"U")>0,Mid([PossibleCombinations],InStrRev([PossibleCombinations],"U"),3),"x")="U" & [forms]![Form7].[text0],1,0))>0))
ORDER BY iubrownie.PossibleCombinations;
if my testing was any good.
You will have to change the field names to your names...