Is the arccosine formula available in Access? What about Pi?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a query to calculate distance using latitude and
longitude. I can't find the arccosine or Pi expressions in Access. Pi is no
big deal, but I really need arccosine. I want to just use a simple query to
calculate it. Any help would be greatly appreciated.
 
See Access VB Help topic "Derived Math Functions".

You can derive PI but it probably not worth the effect due to truncation &
rounding errors. A constant with about 10 decimal places is about as
accurate as you can get.
 
Keezel

You can "borrow" the arccosine function and the constant "Pi" from Excel,
which has both.

Open a code module in Access, select Tools | References, and set a reference
to the Excel object library.

Now, when you need to use Pi or an arccosine, Access Intellisense should be
able to see/use them.

I just used the following in the Immediate Window to display Pi:

?WorksheetFunction.Pi

Regards

Jeff Boyce
<Access MVP>
 

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

Back
Top