Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling SetFocus from within a Valid
Message
From
27/03/1998 12:17:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Calling SetFocus from within a Valid
Miscellaneous
Thread ID:
00087717
Message ID:
00087717
Views:
70
In the Keypress event of my form, I allow the user to press F3 to open a new additional (different) form.

If the user presses F3 when the focus is on a textbox that has code in it’s valid event (even if the code is just a WAIT WINDOW), and if the form that is called calls the SetFocus() method of one of it’s controls (very common in the init’s of most of my forms) then I get the error message:

"Cannot call SetFocus from within a When, Valid, RangeHigh, or RangeLow Event."

I could solve my problem by getting rid of either my Valid or my SetFocus, but because I want them both, I’m looking for a different approach.
Next
Reply
Map
View

Click here to load this message in the networking platform