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
adding multiple fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: adding multiple fields
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
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
thank you SO much!
There must have been something in my spacing or labeling.
There must have been something in my spacing or labeling.