IGPCS,
Sorry to be picky but, what works? Did you try your solution in a report?
You provided an IIf() function that contains only two arguments. A quick check of Help states:
IIf(expr, truepart, falsepart)
The IIf function syntax has these named arguments:
Part Description
expr Required. Expression you want to evaluate.
truepart Required. Value or expression returned if expr is True.
falsepart Required. Value or expression returned if expr is False.
Also, you seem to be attempting to assing a value with the truepart
[Packaged units]= [Total units] -[Actual units]
That will only evaluate to either true or false.
Also, you can't sum a control from the detail section in a group or report header or footer. If you attempt to sum a control, you will get a parameter prompt for [TextTotals].
Also, text boxes have Control Sources, not Record Sources.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]