Please do me the favour to check again. As I wrote, add a simple Browse to check that records really are selected. And once more I ask you to please show us the WHOLE non working code, WITHOUT any modifications. SInce you only show fragments and pseudo code, it's really hard to see what is going on.
To make the code more readable, please use < pre > before the code and < /pre > after the code. Don't type the spaces after < and before >, I must use extra spaces here or UT will remove them.
>Hi Tore,
>
>>As I can see it, there are ony two possibilities, which both should be easy to check.
>>1. The cursor CuDedEmp is not "active" anymore.
>>2. Your second select statement finds no matching errors.
>
> I believe that neither of your suggestions covers the problem.
> 1. CuDedEmp must still be active because in the workaround, rows are inserted to it.
> 2. The test "IF lnTallyCuDed1Emp > 0" shows that rows do exist.
>
> Thanks again, Chaim