Access: Sqr Function

In Access, the Sqr function returns the square root of a number.

The syntax for the Sqr function is:

Sqr ( number )

The argument number can be any valid numeric expression greater than or equal to zero.

Sqr (0)      returns 0 
Sqr (3)      returns 1,73205
Sqr (16)     returns 4

VBA Code

Dim MyNumber 
MyNumber = Sqr(15)

This example uses the Sqr function to calculate the square root of a number. Now the MyNumber variable would contain the value 3,8729833.

SQL query

You can also use the Sqr function in a query.

SELECT Sqr([BuyerId]) AS Expr1 
FROM Antiques


Leave a Reply

Your email address will not be published.