ACC2000: Cannot Calculate an Expression Inside an Aggregate Function on a Form or Report in an Access Project (225992)
The information in this article applies to:
This article was previously published under Q225992 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
In a Microsoft Access project, if you place a calculation inside an aggregate (totals) function, you may see one of the following problems:
CAUSE
This problem may occur when you set the ControlSource property of a text box on a form or a report to a calculated value inside an aggregate function. For example:
=Sum([Quantity]*[UnitPrice])
RESOLUTION
Create a field in the record source of the form or the report based on the expression, and then use the aggregate function on that field in the form or the report. For example, create a new field named TotalPrice in the Order Details Extended view. The expression to calculate TotalPrice is:
[Order Details].[Quantity]*[Order Details].[UnitPrice]
Then add a text box to the form's footer, and set the ControlSource property to =Sum([TotalPrice]).
Modification Type: | Major | Last Reviewed: | 6/28/2004 |
---|
Keywords: | KbClientServer kbprb KB225992 |
---|
|