>>Hi Naomi
>>
>>>I think the UDF is messing you up. I see that Sergey already provided a plan to work it out.
>>
>>Yes, it is the UDF, I tried Sergey's code and same problem, so I took only the inside select and yet a problem, then I removed the UDF and it works.
>
>So create an empty field instead. Then when you get the cursor, you can replace it with the value given by the UDF. It may even be faster than to call the function during a select.
This sounds like a good idea.
If it's not broken, fix it until it is.
My Blog