Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to keep cursor in field till data input is correct?
Message
From
15/02/2000 08:21:00
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00331251
Message ID:
00332111
Views:
14
>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
Map
View

Click here to load this message in the networking platform