Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I want to stay on a field?
Message
 
To
19/09/1997 22:18:31
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00049609
Message ID:
00050907
Views:
37
Dragan,

You would need to handle that in the LostFocus() of the current control. In some fashion you need to know what key was pressed to exit the control, this could be accomplished in the control's keypress event. Add a property to the control named ExitKeyCode and in the keypress;

IF nKeyCode = {BackTab} OR ...
THIS.ExitKeyCode = nKeyCode
ENDIF

Then in the Valid;

IF THIS.ExitKeyCode =
RETURN .T.
ENDIF

In the LostFocus you can also look at ExitKeyCode to find out what to do.

You still need to validate the data when they hit the save button because they could;

1) put in bad data
2) backtab to the previous control
3) click the save button

If this is true then why are we validating at all in the control?
Previous
Reply
Map
View

Click here to load this message in the networking platform