General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only