Access: Atn Function

In Access, the Atn function returns a double containing the arctangent of a number.

The syntax for the Atn function is:

Atn( number )

The required number argument can be any valid numeric expression. The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

Example

Atn (15)   returns 1,50422816301907 
Atn (21)   returns 1,52321322351791

VBA Code

Dim MyNumber As Double 
MyNumber = Atn(2)

This example uses the Atn function to calculate the arctangent of a number. Now the MyNumber variable would contain the value 1,10714871779409.

SQL query

You can also use the Atn function in a query.

SELECT Atn([OwnerID]) AS Expr1 
FROM Orders
admin

admin

Leave a Reply

Your email address will not be published.