Calculation expressions in Access 2016

Expressions in MS Access can be understood similarly to formulas in Excel. Expressions can include operators, constants, functions, and identifiers.

Expressions in MS Access can be understood similarly to formulas in Excel. Expressions can include operators, constants, functions, and identifiers.

Expressions used to perform various tasks. In this article, TipsMake.com will guide you to create a specific type of expression called a calculation expression . We will create calculated fields and display data that is not available in the database that is calculated from the stored individual fields.

To illustrate, we use information from many different tables: tblKhachhang, tblSach, tblDonhang, tblChitietdonhang .

Picture 1 of Calculation expressions in Access 2016
Use information from many different tables: tblKhachhang, tblSach, tblDonhang, tblChitietdonhang

Run the query and you will see the following results.

Picture 2 of Calculation expressions in Access 2016
Results when running the above query

Now we try to perform a simple calculation, taking the number of books placed multiplied by the selling price of one book to get the total amount to be paid. We call this field Total money.

Full expression:

 Tongtien: [tblChitietDonhang]![Soluong]*[tblSach]![GiaChitiet] 
Picture 3 of Calculation expressions in Access 2016
Create expressions in the new Tongtien field

Running the query, you can see that Tongtien field appears at the end.

Picture 4 of Calculation expressions in Access 2016
There are rows Total money is the result of 2 columns Soluong and GiaChitiet

Add a tax calculation column :

 Thue: [Tongtien]*0.1 
Picture 5 of Calculation expressions in Access 2016
Add tax equal to 10% of the total amount

Run the query yourself and see the results in the last column.

Previous lesson: Wildcard representation operator in Access

Next lesson: Wildcard representation operator in Access

You've just finished reading the article "Calculation expressions in Access 2016" edited by the TipsMake team. You can save calculation-expressions-in-access-2016.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.

« PREV How to use Safer.chat to create a secure chat room
NEXT » How to automatically color rows and columns in Excel