Information générale
Catégorie:
Codage, syntaxe et commandes
YEP that was it.
I checked MSDN on this point and from that explaination, I suppose that the .SETFOCUS can not be used from VALID because of RETURN 0. That being the case it would have been nice if VALID - RETURN 0 were in the SEE ALSO for .SETFOCUS.
Anyway, I'm ranting. Thanx for the help my fellow Canadian!
>>After a simple test fails on a form, I want the focus to stay on the field/control it is currently on. So I thought I would use:
>>
>>thisform.xxxxx.setfocus
>>
>>which seems to work fine in some instances and not in others. Specifically, if that code is used in the LOSTFOCUS event it is ignored.
>>
>>The control is visible and active.
>>
>>Originally I had the code in the VALID event but VFP informs me that .SETFOCUS can not be used in VALID.
>>
>>I can only get .SETFOCUS to function as I expect from buttons.
>>
>>Ideas???
>
>Ian, you can still have your validation code in Valid and not use Setfocus at all. If your test fails just RETURN 0 from Valid().
>
>Nick
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement