Functions in queries: squareroot

J

Jean Robinson

Is it possible to use the function SQRT (square-root) in
an access expression?? When I try, access will not
recognise SQRT as it is a worksheet function. Does anyone
know how to get round this?
jean
 
F

Fredg

Perhaps that's because SQRT is not an Access function..
but SQR is.

= SQR(9)
will return 3.
 
H

Heather

G'day Jean,

According to MS Access Help, this is what you want:-

Sqr Function

Returns a Double specifying the square root of a number.

Syntax

Sqr(number)

The required number argument is a Double or any valid
numeric expression greater than or equal to zero.

This example uses the Sqr function to calculate the square
root of a number.

Dim MySqr
MySqr = Sqr(4) ' Returns 2.
MySqr = Sqr(23) ' Returns 4.79583152331272.
MySqr = Sqr(0) ' Returns 0.
MySqr = Sqr(-4) ' Generates a run-time error.

Hope you can follow this. Blowed if I can!

Cheers,

Heather. :)
 
J

Jean Robinson

Thanks, it does work, must have been a long day!. I don't
suppose you know how to include the statistical function
FINV in an access query - I couldn't get that to work
either (used in calculation of exact confidence limits),
cheers,
jean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top