Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Focus from the Lost Focus event
Message
 
To
07/07/1999 11:18:41
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00238319
Message ID:
00239365
Views:
10
>I have an application with a required field. The information is entered with a textbox control. In the lostfocus event of the textbox there is code to make sure that the information is valid. What I need to do if the information entered is not valid is reset the focus back to the textbox. Right now the focus goes to the next control in the screen. How do I fix this?
>
>Any ideas?
>
>Jim

Jim

You have two choices, 1) put the code in teh Valid and if the field is not good return 0, or 2) in the Lostfocus if the field is not good issues This.SetFocus followed by NODEFAULT.

Personally, I think using the Valid is the better design because the prupose of the valid is to determine if you will allow the user to leave the control, the purpose of the LostFocus is to react to the user leaving the control.
Previous
Reply
Map
View

Click here to load this message in the networking platform