>Can somebody tell me, why in the next piece of code, sometimes fail step1 or step2 or step3???
Does it work if you comment out all code except the selects & locks? That might help to isolate it...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.