Subform calculations

Subform calculations

I’m having trouble adding a column of numbers in a subform. As an example I created a form with the new builder. It has a subform with one numeric field, a separate number field for the total and a decision box to calculate the total.

I added two rows to the subform. The number field on row one is 1, the number field on row two is 2. The calculation gives me a total of 5. If I add a third row with a value of 0 then the total drops to 3. The last row is being counted twice.

Here is the script for the calculation
  1. Subform_total=0;
  2. for each row in SubForm
  3. {
  4.     Subform_total=(input.Subform_total  +  row.Number);
  5. }

This has already been reported to support Ticket ID:2452424. While they are working on it I thought others might have a solution.


Herb Wexler