MS Access: Exp Function
This MSAccess tutorial explains how to use the Access Exp function with syntax and examples.
Description
The Microsoft Access Exp function returns e raised to the nth power, where e = 2.71828183.
Syntax
The syntax for the Exp function in MS Access is:
Exp ( number )
Parameters or Arguments
- number
- The power to raise e to.
Returns
The Exp function returns a numeric value.
Applies To
The Exp function can be used in the following versions of Microsoft Access:
- Access 2019, Access 2016, Access 2013, Access 2010, Access 2007, Access 2003, Access XP, Access 2000
Example
Let's look at how to use the Exp function in MS Access:
Exp (3) Result: 20.085536923 Exp (3.1) Result: 22.197951281 Exp (-3) Result: 0.0497870684
Example in VBA Code
The Exp function can be used in VBA code in Microsoft Access. For example:
Dim LNumber As Double LNumber = Exp(3)
In this example, the variable called LNumber would now contain the value of 20.085536923.
Example in SQL/Queries
You can also use the Exp function in a query in Microsoft Access.
For example:
In this query, we have used the Exp function as follows:
Expr1: Exp([Quantity])
This query will calculate e raised to the power of the Quantity field and the results will be displayed in a column called Expr1. You can replace Expr1 with a column name that is more meaningful.
For example:
ExpValue: Exp([Quantity])
The results would now be displayed in a column called ExpValue.
Advertisements