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:
00122678
Views:
16
You're absolutely right. This is where the code should go ideally. Earlier on, I had misunderstood and thought he was trying to set focus from one control to another, which you can not do in a valid event.

>Why not put this in the mytextbox1.VALID instead?
>
>store allt(this.value) to mcard_nbr
>SEEK MCARD_NBR
>IF MCARD_NBR<>Card_Nbr .OR. DELETE()
> DO quickmsg WITH "CUSTOMER'S CARD NO. NOT ON FILE"
> RETURN 0
>ENDIF
>
>
>>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
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform