>This doesn't make sense. If the last key the user pressed was the escape key, then the form will be closed and it doesn't matter to the form what the user does after that.
It shure does ; if the user pressed the escape key 10 minutes ago and in the mean time he only used his mouse to do whatever you want (something that maybe has nothing to do anymore, with the escape key pressed !!!), the LASTKEY() will still return 27 !!!