Michel,
A command button with .Cancel set .T.
Form.KeyPress() event.
>I can't remember what makes the escape key control the sequence which leads to the QueryUnload() event. I remember we've done it in our framework so when this key is pressed, the form is quitting. But, I've been searching for half an hour and I can't remember what I've done to control it. Anyone could give some hints on where I should look for that?