Page 1 of 1

adding multiple fields

Posted: Wed Jul 21, 2010 3:06 pm
by mincs2
I am trying to add 3 fields together and display the value in another field
I tried to use the "+" function and the "add" function but those only appear to work with 2 terms.

any help is greatly appreciated1

Re: adding multiple fields

Posted: Wed Jul 21, 2010 3:21 pm
by dunbarx
try this in a button:

on mouseUp
put fld "field1" + fld "field2" + fld "field3" into fld "field4"
end mouseUp

This assumes you have numbers in those three fields. If not, you need to validate the data:

on mouseUp
If fld "field1" is a number and fld "field2" is a number and fld "field3" is a number then put fld "field1" + fld "field2" + fld "field3" into fld "field4"
end mouseUp

See?

Did you mean you wanted the sum to appear in the results field just when numbers are entered into the other fields? If so, write back.

Craig Newman

Re: adding multiple fields

Posted: Wed Jul 21, 2010 3:35 pm
by mincs2
thank you SO much!
There must have been something in my spacing or labeling.