>>Naomi,
>>
>>I would make the escape property of the buttons that can canel .T. Then all you need to check is if lastkey() = 27 because clicking the button is the same as pressing ESC key.
>
>In our system I believe the ESC closes the form and not equals Cancel.
as far as i understand, it is against the MS GUI rules. It is not the law to obey, of course ;)
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer