I am trying to get a form to show a zero if the number subtracted results in a negative.
ie $100 - $200 = $0
Please help the scripting afflicted.
Hi,
The script in the calculate event of the numeric field would need an if/else statement. For example (using JavaScript):
var nAns = NumericField1.rawValue - NumericField2.rawValue; if (nAns >= 0) { this.rawValue = nAns; } else { this.rawValue = 0; }
Hope that helps,
Niall
Correct as always. Thanks, Niall.
I have little scraps of paper with your scripts on them taped all over the walls of my office. They always did think I was strange here.
Your friend, Cake Diva
...I'll just have to turn those scraps into a book!
I'd buy it!!!!