Hello!
I'm trying to perform a sum to a form footer in order to transfer the value to the main form. Tricky part is that an iif function is being used to the subform body. When trying to nest the iif to the sum I'm getting #Error as a value from the main form field so I presume that I can't nest iif under sum. Also I can't use the value of the already calculated field from the subform.
In detail the following take place.
Subform:
[Price] : gets a value from a table
[Price2]: =((IIf([Cover]=No;[Price];[Price]+200))*((100-[Discount])/100)*[QTY])
The above work without issues.
Subform footer:
[SumItems]: =Sum((IIf([Cover]=No;[Price];[Price]+200))*((100-[Discount])/100)*[QTY])
If i change (IIf([Cover]=No;[Price];[Price]+200) to [price2] access can't do the calculation so i always get 0 as value to the field of the form. Any ideas regarding a workaround?
Thanks!