Calculate a total or other value for one record on a grouped data access page

Calculate a total or other value for one record on a grouped data access page

  1. Open the data access page in Design view.

  2. If the expression will reference field names, then the fields need to be in the page's data definition. Either add the fields to the page as bound HTML controls, or add the fields as bound text boxes.

    Tip   The page will load faster in Page view and in Microsoft Internet Explorer if you use bound HTML controls.

  3. Create another control by clicking the Bound HTML tool Bound HTML control or the Text Box tool Text Box control in the toolbox, and then releasing the mouse button where you want the upper-left corner of the control on the page.

  4. To display the property sheet, make sure that the control is selected, and then click Properties on the toolbar.

  5. In the ControlSource property box, type an alias and an appropriate expression. To reference fields on the page, use the names of the fields in the expression. For example, if you want to compute the extended price for a record in the Order Details table, type:

    ExtendedPrice: UnitPrice*Quantity

    If you don't specify an alias, you must type an equal sign (=) before the expression. Access will automatically supply an alias; for example, Expr1.

Notes