So if I understand it clearly then handling of multiple controls in one event was the cause of the deadlock as it was waiting for "Clock Out" value change event to occur and then again "Clock In" value change to occur? I thought that if I change the value of one of the controls it would exit the loop and move on to the next case as I was using State Machine concept.
Thanks for all your help and your informative email also.