Did you check in the debugger, that set("escape") = "OFF", at the point of interest?
Even if you set it off, it might be ON for some reason. For instance, some settings can have different values in different datasessions; I am not sure whether SET ESCAPE is one of them.
>Hilmar, I should have checked earlier when you started talking about SET ESCAPE. I have SET ESCAPE OFF at the beginning of my main program, and I've checked all the other code for a place where it might have been set ON, but there are none. Yes, I am able to carry out default actions as you suggest including closing BROWses and previews. And the forms have a Cancel button with the Cancel property set to .T. In the case of a no-data-entry form there is one button that has both Cancel and Default set to .T.
>
>I'll have to spend more time in the debugger; other than LASTKEY(), what should I be watching for?
>
>Thanks much,
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)