Make Calculations Based Data In Access 2010

In this article I am going to explain Make calculations based on our data In Access 2010.
  • 3292
Make calculations based on our data
  • Calculations value are based on change, because the value can become out of date in some cases.

  • For Example, when we create a employee table then we do not store age in a table, because every year we would have to update the value.

  • So we store the employee date of birth in our table, and then use an expression in a query to calculate the person's age.

Use the following procedure to create a query that calculates product subtotals based on data from order details table.

  • First we open the northwind database in access 2010.

 Northwind database open in access 2010.JPG

  • We click the create tab and then click the query design in a query group.

  • When open the show table, then double click the order details, on the table tab.

 order details table in access 2010.jpg

  • Then close the show table dialog box.

  • When we open the order table then double click product id.

  • Add a field to the first column of the query design grid.

  • In the second column of the grid, right-click the Field row, and then click Zoom on the shortcut menu.

  • Then type the code in the zoom table.

  • Subtotal: ([Quantity]*[Unit Price])-([Quantity]*[Unit Price]*[Discount]).

 code in zoom box in access 2010.jpg

  • Then we click run tab in result group and save the query, and then name the query Product Subtotals.

 run order table in access 2010.jpg

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.