Ok,
I did not specify how "oldSpotype" was defined, it is a normal string with some value, but i don't think it is vital to my exampel. Neither is how i use Find first.
My main problem is that i can not use a user-defined function in a where clause. Maybe it is bad practice in progress, but it...