totn Access Functions

MS Access: Atn Function

This MSAccess tutorial explains how to use the Access Atn function with syntax and examples.

Description

The Microsoft Access Atn function returns the arctangent of a number (expressed in radians).

Syntax

The syntax for the Atn function in MS Access is:

Atn ( number )

Parameters or Arguments

number
A numeric expression.

Returns

The Atn function returns a numeric value in radians.

Note

  • To convert radians to degrees, multiply radians by 180/pi.

Applies To

The Atn 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 Atn function in MS Access:

Atn (2)
Result: 1.10714871779409

Atn (2.51)
Result: 1.19166451926354

Atn (-3.25)
Result: -1.27229739520872

Example in VBA Code

The Atn function can be used in VBA code in Microsoft Access.

For example:

Dim LNumber As Double

LNumber = Atn (210)

In this example, the variable called LNumber would now contain the value of 1.56603445802574.

Example in SQL/Queries

You can also use the Atn function in a query in Microsoft Access.

For example:

Microsoft Access

In this query, we have used the Atn function as follows:

Expr1: Atn([Quantity])

This query will return the arc tangent of the Quantity field and display the results in a column called Expr1. You can replace Expr1 with a column name that is more meaningful.

For example:

AtnValue: Atn([Quantity])

The results would now be displayed in a column called AtnValue.