Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus() doing its own thing...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00382456
Message ID:
00382775
Views:
16
Kile,
Thanks for explaining why "KeyPress" instead of "LostFocus". In your case it's the right move. Glad the NODEFAULT worked. I've found that when I'm writing code in KeyPress that I need to put NODEFAULT in the first line, write my CASE statement for exceptions and then put in OTHERWISE DoDefault(). Otherwise (so to speak) I forget to NODEFAULT and get weird results.

Barbara

>Barbara & Fred -
>
>Bingo! The NODEFAULT did the trick. Thank you so much!
>
>
>Barbara -
>
>The LostFocus suggestion was also a good one, but I don't think it fits for my case. Coding your suggestion would mean that the user was forced to move to the command button in question, whereas putting the code in the KeyPress() event will set focus to the command button only if the user is tabbing through in the data entry process. This was more of a data entry speed issue than a requirement in the data entry process. I still want the user to be able to click on another object if there situation requires it, I just wanted the said command button to be the next to receive focus by default.
>
>Thank you!
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform