Thanks Jim. Works good. I like this even better than SYS(1270) as I found that if my mouse cursor just *happened* to be sitting over the Cancel button, .... :-)
I have had 'Effective Techniques' on order w/Amazon for a couple weeks. It was a special order, but their online reviews were just too good!
BTW, is the quote in your sig from Star Wars? (uh, I don't get it)
Oh, well. Thanks again!
Mike Collins
>Mike,
>
>An alternative appraoch that isnnot name dependent and will probably make your users happy, is to set the cancel button's Cancel property to .T. making it the Escape button. This causes the Escape key to fire the Cancel button's Click and a click on teh Cancel button will cause LastKey() to return 27 indicating the Escape key.
>
>Now in your LostFocus you simply;
>
>
>IF LastKey() = 27
> * Cacnel
> RETURN .T.
>ENDIF
>* Other processing here
>