Hi
I found the solution. I should use the "NoDefault" clause in the lostfocus method.
Simon
>Hi
>
>The documentation clearly states that you can use SetFocus in the Lostfocus method (I am well aware that it cannot be used in the Valid, when .. methods). However, if you use:
>
>This.SetFocus
>
>in the LostFocus method the focus does not return to the control but moves to the next control in the tab order. I was hoping this would return the focus to the control that just lost the focus.
>
>I know I could use the Valid event but there are times when I would like to use the SetFocus method so I cannot use the valid event. I was hoping to use the LostFocus for data validation and return focus to the control if the data was invalid.
>
>If I try to set the focus to another control all works fine. I just cannot set the focus back to the control losing the focus. Is this by design?
>
>
>
>Thanks
>Simon
Simon White
dCipher Computing