Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My trigger has gone mad
Message
De
09/05/1999 19:12:53
 
 
À
09/05/1999 16:02:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00216564
Message ID:
00216585
Vues:
25
>I am creating my first project, in the hope of impressing a potential employer. Not easy as I have never used this language before!!
>I am trying to set a trigger so that numbers less than 0 and greater than 100 cannot be entered in an id# (called cidnum)The expression I used was ((cidnum<0) .OR. (cidnum =>100))vfp accepted the expression, but when I was trying to enter data, it wouldn'nt accept any number. Do I have to assign a value to this field first?????????
>Any advice greatly appreciated.
>Colette

In addition to my previous message... you wrote your expression backward... you want it to return true if the number is correct... Your expression will return true is cIdNum is less than 0 or equal to or greater than 100. You want your expression to be...

cIDNum > 0 AND cIDNum <= 100

So, if you number is greater than 0 AND less than or equal to 100 it is true, and the value is accepted.

As I said in my previous message, use a Field Rule, not a trigger!

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform