>I have a list box that in the lost focus event fires a necessary procedure. I want to skip this when someone presses the cancel button. How do I trap for that specific object?
>
>I was thinking of :
>if ThisForm.Command1.????
> return
>endif
>
>what should the ??? be ?
>
>TIA
>
>__Stephen
Stephen, did you try
IF LASTKEY() = 27
?
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison