Calculate a total, average, or other aggregate for a group of records in a data access page

Calculate a total, average, or other aggregate for a group of records in a data access page

  1. Open the data access page in Design view. The page must have at least two group levels.

  2. Create a bound HTML control bound to the field you want to use to calculate a total, average, or other aggregate in the appropriate group header or group footer. For example, to calculate an order subtotal on a page with group levels bound to the Orders and Order Details tables, you would put the control that calculates the subtotal in the group header or footer of the higher group level, Orders.

  3. Make sure the bound HTML control is selected, and then click Properties on the toolbar to display the property sheet.

  4. In the TotalType property box, select the type of aggregate you want from the list: Sum, Avg, Min, Max, Count, Any, or StDev.