Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.setfocus method
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00122406
Message ID:
00122460
Views:
23
>Sorry about that, but the solution will still work.
>
>>>The enter keystroke is being sent to your second textbox. Add a nodefault inside your condition to prevent this from happening.
>>>
>>>ie:
>>>

>>>IF MCard_Nbr <> Card_Nbr .OR. DELETE()
>>> nodefault
>>> do quickmsg with "CUSTOMER'S CARD NO. NOT ON FILE"
>>> thisform.mytextbox1.setfocus()
>>> thisform.refresh
>>>ENDIF
>>
>>I have one textbox and a quit(cmdbutton). The user enters his data and if it's not on file, I want the setfocus to go back to the textbox. Pure & simple. I think

I guess my concept is flawed. I want the process to continue if the info entered into the textbox is correct, otherwise I want the focus to go back to the textbox. Which event should I put my code into? Thanks.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform