>I have a valid event that contains the following command:
>
>IF LASTKEY() = 27
> RETURN .T.
>ENDIF
>
>but whenever I press a Cancel button, the valid event still goes through and I cannot cancel without entering something...
>
>TIA
>
>Jeff T.
Set the Cancel property of the button to True. Then when you press the Cancel button LASTKEY() will return 27.
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.