Sum Function

hinser13

Registered User.
Local time
Yesterday, 19:42
Joined
Aug 8, 2010
Messages
75
Dear All

I am trying to use the sum function unsucessfully to subtract work completed values from the whole project value, if the true condition is ticked.

=Sum(IIf([ValueWorkCompleted]=True,[TotalValueIncVAT]-[StatementOriginalValue))

This sould be, if the work is completed, subtract the job value from the total value.

Thanks in advance

Mark
 
The IIF function needs 3 parameters. You need to tell it what to do if the condition is false. Also remember that it always evaluates both the true and false fields so make sure they are always valid (nop dividing by zero for example).
 
If you have a control name and field in the database with the same name, a statement like that might cause problems.
Change the name of the control to be different from the database field name.
 

Users who are viewing this thread

Back
Top Bottom