Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AHHHHHH!!!!!!!
Message
 
To
10/02/1999 17:54:15
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00186258
Message ID:
00186272
Views:
13
Try returning 0 in the Valid. That tells it not to move the focus but it won't trigger the default Valid message. To solve John's issue where it can be impossible to get out of a field without entering a value you can always return .T. if LASTKEY()=27. That will let the user get out by pressing escape or clicking a button that has its Cancel property .T. Even this can cause a problem if your cancel button asks the user if he really wants to cancel. If he says no then clicks OK, he can get out without entering a valid value.

>OK that works but if the user clicks on the screen the valid event is run twice. If I put the code in the lostfocus the focus 1 message pops up, but the focus is not reset the the field that needs a value.
>
>Jim
>
>>Jim,
>>RETURN .F. from the valid event to keep focus on the control. Be careful - it can be difficult getting out if the user can't enter a valid value.
>>
>>Mark
>>
>>>I am having a problem with the lostfocus and valid events. I have a field that the user needs to enter, i have the logic for this. In my logic i tell the user he must enter the information. The problem is when the logic is in the valid event the same message comes up twice. If I put the code in the lostfocus event the message comes up once, but the focus is not reset to the box that needs the information.
>>>
>>>Any ideas?
>>>
>>>Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform