Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Hi,
>
>i have a form in witch there's a textbox that receive a positive number and i want to put validation on it. if it's negative, don't leave the box. so what i do is in the lostfocus
>
> if thisform.number.value < 0
> messagebox(...)
> thisform.number.setfocus
> endif
>
>the messagebox appears but the setfocus don't go back to the textbox.
>
>can somebody tell me what is missing (or what am i missing)
>
>thanks for your time
>
>nad
replace:
THISFORM.NUMBER.SETFOCUS
with:
RETURN 0 (that is the the word RETURN and the # zero)
FYI, this item is documented in MSDN under VALID. I had the same prob 3 months ago and even though it was obviously in the documentation, I missed it, just like you.
Hope this helps!
Précédent
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