Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.setfocus method
Message
From
29/07/1998 14:48:46
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00122406
Message ID:
00122416
Views:
21
>>>For some reason the focus does not get set in the following:
>>>store allt(thisform.mytextbox1.value) to mcard_nbr
>>> SEEK MCARD_NBR
>>> IF MCard_Nbr <> Card_Nbr .OR. DELETE()
>>> do quickmsg with "CUSTOMER'S CARD NO. NOT ON FILE"
>>> thisform.mytextbox1.setfocus()
>>> thisform.refresh
>>>
>>>Is there a fault here?
>>>thanks
>>
>>If this code is being executed in a Valid event, Setfocus() can not be executed in the Valid in VFP5.
>>
>>Bill
>It's evaluated in the keypress event, forgot to mention that.

KeyPress does not seem like the place to execute this code or it will be executed on every key stroke and the record could not be found until the whole card number was entered.
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform