I am receiving a error when I try to generate a report in MS Access that reads:
This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.
The expression that is the problem is:
=Sum(([Invoiced Amount]-[Completed Cost])/[Completed Cost])
It appears that the only time I will have a problem with it is when "Completed Cost" is zero which leads me to think that I am having a "divide by zero" error. Can anyone suggest anything I can do?
The problem with the way the code was written above is that the IIf function, when it is passed expressions will evaluate the expressions regardless of whether or not the statement evaluates false (According to Microsoft's Online Help). Therefore, I rewrote the code as follows and it worked fine