Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Click or keypress
Message
 
À
09/02/2006 07:57:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01094948
Message ID:
01094954
Vues:
12
>hi all,
>
>any new way to write this code under , and at click or keypres is better
>
>IF thisform.text2.value=ALLTRIM("Residential") AND thisform.text1.Value <   1    OR thisform.text1.Value>5
>        =MESSAGEBOX("out of range")
>            thisform.text1.SetFocus
>ENDIF
>IF thisform.text2.value=ALLTRIM("Business") AND thisform.text1.Value < 1 OR     thisform.text1.Value>4
>       =MESSAGEBOX("out of range")
>     thisform.text1.SetFocus
>ENDIF
>
>thanks.
lcText2Val = UPPER(ALLTRIM(thisform.text2.value))

IF INLIST(lcText2Val, [RESIDENTIAL],[BUSINESS]) AND NOT;
   BETWEEN(thisform.text1.Value, 1,  IIF(lcText2Val == [RESIDENTIAL] 5, 4))
   =MESSAGEBOX("out of range")
   thisform.text1.SetFocus()
ENDIF
About where you must put this code, I don't know becuase I don't know what you want to do and WHERE you want to do it.
This is validation code and must be there where you validate the Data.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform