General information
Category:
Forms & Form designer
>Valid gets lastkey 27 (I see it in my wait window message) and loses focus. Then the Cancel button gets focus, but the release of the form is not executed. If I hit the Cancel button once more, then it releases. What am I doing wrong?
I don't know about wrong, but what about putting thisform.release in the valid clause. Put your form-closing code in the release event (if needed)
valid:
If lastkey=27
thisform.release
Else
**other code
Endif
the problem is likely caused by the change in focus, and that the cancel button must be focused before it can fire (which it can't do until the valid clause finishes)
HTH
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only