Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exiting a Textbox Validation
Message
De
23/03/1999 11:43:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Exiting a Textbox Validation
Divers
Thread ID:
00200980
Message ID:
00200980
Vues:
38
I have a VFP 5 form with a few textboxes that I would
like to validate. For instance, the deposit date can
not be greater than the payment date.

However, I would also like the user to be able to exit
the entry via an escape key. The code below is my
attempt.

IF LASTKEY() = 27
ThisForm.cmdCancel.Click()
RETURN 1 && this does not work
ELSE
IF This.Value > This.Parent.txtdpayment.value
MessageBox('Deposit date > Payment date',0)
RETURN 0
ENDIF
ENDIF

If I hit the escape key the textbox still has focus and
when I attempt to move off it the valid fires. This is
somewhat of a recursive issue.

Can someone help. I am sure that many of you have been down
this path...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform