Generate a value from other values ...

Chunk

Registered User.
Local time
Today, 13:44
Joined
Oct 25, 2004
Messages
64
I want to have a coloumn called "level" which is generated depending on what "height" and "width" and "age" have been set to.

I have a table:

stats(name,height,age,width,level)

i want level to be worked out automatically, such that:

if height > 10 and wieght > 10 and age 10
then level = 1
else

if height > 5 and wieght > 5 and age 5
then level = 2

else level = 3


How can I go about setting this up?

Thanks.
 
Ive written the function, but I get "Undefined function calcLevel", when I try to use it an a query.
 
Following Pats guide, ive now got the form to display the calculated level. How can I now save the value it calculates into a record of my choice, when the user saves the rest of the record?
 

Users who are viewing this thread

Back
Top Bottom