Subform fields not calculating

Subform fields not calculating

Hello,
I created a form called "Add Sale Subform" then I added a Lookup field to it so that I could add it as a Subform to a main form.
In each of the fields in the Subform I added the below expression on User Input.

input.Amount = (input.Qnty  *  input.Part  +  input.Labor  -  input.Discount);

The updating works fine when I open the form separatly from the main form. But when I open the Main form where this subform is connected the subform fields don't update when modifying them. I tried changing the expression above to use row. instead of input. but I get the following error.

Error at line number : 1 
'row' is a invalid collection and update is not possible

How can I fix this?



Iram