Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Focus from the Lost Focus event
Message
 
To
07/07/1999 14:15:51
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:
00238671
Views:
12
Using NODEFAULT in the LostFocus() should work. However, is there a reason why you couldn't put the code in the Valid() method and simply return .F. or 0? Either one will simply return the cursor to the field so the user can reenter the data.


>What I did is if invalid information was entered I used the nodefault command and that seemed to work. I had the code in the valid event and it worked there too, but Setfocus was called later in the program and we kept getting errors because you can't call setfocus from a valid event, for what ever reason . . .
>
>Thanks for the help,
>
>Jim Rieck
>
>>Jim, Since you cannot setfocus() in the valid or the lostfocus event, I have called the click of another object from the valid or lostfocus and had that click setfocus(), I know this is probably not very clean, but it works.
>>Hope this helps
>>James
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform