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

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

  1. Open the data access page in Design view.

  2. If they aren't already on the page, add the controls that will contain the data you want to use in the calculation.

  3. Click the Office Spreadsheet tool Office Spreadsheet control in the toolbox, and then release the mouse button where you want the upper-left corner of the spreadsheet control on the data access page.

  4. In any cell in the spreadsheet, enter a formula that uses the HTML Document function to refer to the fields used in the calculation, and the specific operation you want to perform on the field's values expressed as a combination of operators, identifiers, and values.

    Example   To multiply the value in the Quantity field by the value in the UnitPrice field, type:

    =document.Quantity.value*document.UnitPrice.value

    Example   To multiply the value in the UnitPrice field by a percentage rate stored in spreadsheet cell C1, type:

    =$C$1*document.UnitPrice.value

Notes