I have a calculated field: TotalDiff. It is the sum of amounts in repeating subforms. I want this calculated amount to display in red if it is a negative amount. I have used FormCalc as this was the only way I could figure out how to sum the amounts from the repeating subforms. I have never used FormCalc before and cannot figure out how to do the font colour change. From reading other discussion threads, I thought the following should work, but it doesn't. The sum formula works fine by itself, but when I add the if/else for the font colour, even that stops working. Where am I going wrong?
It is doing the same as the original script I had - calculation formula works fine but once the colour script goes in even the formula stops working. I tried moving the colour script portion to validate event but that doesn't work either. Would it make a difference that I'm not using tables, just fields?
Thanks Josh, I did try using the action builder first because I'm really bad with code, but I only lets me do it as an exit script so it doesn't actually do the colour change unless the user tabs through or clicks in and out of that total field (which they wouldn't usually do 'coz it's a calculated field). Do you know of a way to get it do this as a calculate or validate action?