Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program Error - Cannot call SetFocus from within ...
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00120667
Message ID:
00130421
Views:
59
Oleg,

Your code would surpress the error but would not move focus where you want it to go because after the Valid returns .T. the LostFocus will set focus to the next control in the tab order.

The best solution is to realize that the purpose of the Valid event is to determine whether or not you will allow focus to leave the control and that is it. Deciding where to go only comes into play aftert you have decided to allow the user to leave. The LostFocus is the event that fires when the control will actually lose focus and that is where you should setfocus.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform