Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validate Method
Message
De
20/12/1996 14:19:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00015679
Message ID:
00015727
Vues:
37
>>I have, so far, been spectacularly unsuccessful in placing code in a control's Validate(). In my latest attempt, the user inputs an item #. The Validate() SEEKs the # in the inventory table and, if not found, throws a messagebox to the screen informing the user of the problem and returning him/her to the control (RETURN(.F.)). The problem is that the Validate() method gets called three times by VFP 3.0, so I have to click thru 3 msg boxes to get back to my control.
>>
>You mean the Valid event, don't you? Validate is something else, for DBCs. Anyway, there are a couple of workarounds. I personally use Lostfocus for this sort of thing, it's more in keeping with the current trend in method and event usage, which seems to be away from Valid. Have you tried that?

Bruce:

You are, of course, right--I mean the Valid event. In any method, I mean event, yes, I have used the LostFocus successfully. I just thought I was being stupid. Of what possible use is the Valid event if it fires 2-3 times when the control loses focus?

Thanks for the assist.

John
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform