Undefined function 'ACOS' in expression

C

CLE

When running a Query in MS Access 2000, I receive the error message
"Undefined function 'ACOS' in expression". The exact expression is:

Distance PGIP Truth: ACOS(Sin([Events]![PGIP Lat])*Sin([Events]![Impact
Lat])+Cos([Events]![PGIP Lat])*Cos([Events]![Impact
Lat])*Cos([Events]![Impact Lon]-[Events]![PGIP Lon]))*6371

It runs with no problem if I use COS, but I don't want the cosine :)

Help lists ACOS as a valid function.
 
J

Joe D

CLE: While the arccosine or inverse cosine (ACOS) is available in Excel, it
apparently is not directly available in Access (I'm looking in Help in
A2003). It can, however, be derived. In A2003 the derivation is available
if you look up COS, then See Also, then Derived Math Functions. Perhaps
A2000 has the same Help.

Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)

I seldom use trig functions these days, but it does seem that Microsoft
could better standardize functions across products, doesn't it.

Perhaps someone else has an easier way to get this. Or you could write your
own function for your application using this formula.
 
B

Brendan Reynolds

A previous discussion on this indicated that the derived function is not
exactly equivalent to the Excel function. I did a Google search, and came up
with the following link. The original poster in that thread reported that
this solved the problem for him ...

http://mypage.bluewin.ch/w.stucki/Programmes.htm

Here's a link to the previous discussion ...

http://groups.google.ie/group/micro...sdaovba/browse_thread/thread/aad589b6c8f5394d

--
Brendan Reynolds
Access MVP

Joe D said:
CLE: While the arccosine or inverse cosine (ACOS) is available in Excel,
it
apparently is not directly available in Access (I'm looking in Help in
A2003). It can, however, be derived. In A2003 the derivation is
available
if you look up COS, then See Also, then Derived Math Functions. Perhaps
A2000 has the same Help.

Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 *
Atn(1)

I seldom use trig functions these days, but it does seem that Microsoft
could better standardize functions across products, doesn't it.

Perhaps someone else has an easier way to get this. Or you could write
your
own function for your application using this formula.

CLE said:
When running a Query in MS Access 2000, I receive the error message
"Undefined function 'ACOS' in expression". The exact expression is:

Distance PGIP Truth: ACOS(Sin([Events]![PGIP Lat])*Sin([Events]![Impact
Lat])+Cos([Events]![PGIP Lat])*Cos([Events]![Impact
Lat])*Cos([Events]![Impact Lon]-[Events]![PGIP Lon]))*6371

It runs with no problem if I use COS, but I don't want the cosine :)

Help lists ACOS as a valid function.
 
C

CLE

Thank you to both Joe D and Brendan Reynolds!
Both repsonses work. Found that creating a new module with the new
functions is a bit easier. Again, thanks to both of you.
CLE

Brendan Reynolds said:
A previous discussion on this indicated that the derived function is not
exactly equivalent to the Excel function. I did a Google search, and came up
with the following link. The original poster in that thread reported that
this solved the problem for him ...

http://mypage.bluewin.ch/w.stucki/Programmes.htm

Here's a link to the previous discussion ...

http://groups.google.ie/group/micro...sdaovba/browse_thread/thread/aad589b6c8f5394d

--
Brendan Reynolds
Access MVP

Joe D said:
CLE: While the arccosine or inverse cosine (ACOS) is available in Excel,
it
apparently is not directly available in Access (I'm looking in Help in
A2003). It can, however, be derived. In A2003 the derivation is
available
if you look up COS, then See Also, then Derived Math Functions. Perhaps
A2000 has the same Help.

Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 *
Atn(1)

I seldom use trig functions these days, but it does seem that Microsoft
could better standardize functions across products, doesn't it.

Perhaps someone else has an easier way to get this. Or you could write
your
own function for your application using this formula.

CLE said:
When running a Query in MS Access 2000, I receive the error message
"Undefined function 'ACOS' in expression". The exact expression is:

Distance PGIP Truth: ACOS(Sin([Events]![PGIP Lat])*Sin([Events]![Impact
Lat])+Cos([Events]![PGIP Lat])*Cos([Events]![Impact
Lat])*Cos([Events]![Impact Lon]-[Events]![PGIP Lon]))*6371

It runs with no problem if I use COS, but I don't want the cosine :)

Help lists ACOS as a valid function.
 
C

CLE

Thank you to both Joe D and Brendan Reynolds!
Both repsonses work. Found that creating a new module with the new
functions is a bit easier. Again, thanks to both of you.
CLE

Joe D said:
CLE: While the arccosine or inverse cosine (ACOS) is available in Excel, it
apparently is not directly available in Access (I'm looking in Help in
A2003). It can, however, be derived. In A2003 the derivation is available
if you look up COS, then See Also, then Derived Math Functions. Perhaps
A2000 has the same Help.

Inverse Cosine Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)

I seldom use trig functions these days, but it does seem that Microsoft
could better standardize functions across products, doesn't it.

Perhaps someone else has an easier way to get this. Or you could write your
own function for your application using this formula.

CLE said:
When running a Query in MS Access 2000, I receive the error message
"Undefined function 'ACOS' in expression". The exact expression is:

Distance PGIP Truth: ACOS(Sin([Events]![PGIP Lat])*Sin([Events]![Impact
Lat])+Cos([Events]![PGIP Lat])*Cos([Events]![Impact
Lat])*Cos([Events]![Impact Lon]-[Events]![PGIP Lon]))*6371

It runs with no problem if I use COS, but I don't want the cosine :)

Help lists ACOS as a valid function.
 

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