In Access, the Abs funtion returns the absolute value of a number.
The syntax for the Abs function is:
Abs( number )
The argument number can be any valid numeric expression. If number contains Null, Null is returned. The absolute value of a number is its unsigned magnitude. For example, ABS(-1) and ABS(1) both return 1.
Example
|
VBA Code
|
This example uses the Abs function to compute the absolute value of a number. Now the MyNumber variable would contain the value 42.7.
SQL query
You can also use the Abs function in a query.
|