Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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
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