Not able to total from subform
I'm trying to total the amount from subform and display in the main form.
But it seems the for each loop is not going through all the rows.
Here is the script I'm using:
- ProductTotal = 0.0;
- for each item in Product_Details
- {
-
- ProductTotal = (ProductTotal + (ifnull(itemTotal,0.0) ));
- }
- Product_Total = ProductTotal;
What am I doing wrong?