473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

The Function PI()

Hi

I need to use the function PI() in a qAccess query....Problem I can not find a function called PI. The function exists in EXCEL. I can use 22/7 or 3.14159...but it would be much easier to use the standard function.

Am I missing it or not looking in the correct Help menu?
Nov 2 '06 #1
6 46167
VALIS
21
Hi

I need to use the function PI() in a qAccess query....Problem I can not find a function called PI. The function exists in EXCEL. I can use 22/7 or 3.14159...but it would be much easier to use the standard function.

Am I missing it or not looking in the correct Help menu?

You might need to load an add-in msowcf.dll.
Can you use ASIN() ?
If this works then 2*ASIN(1) = Pi
Nov 2 '06 #2
NeoPa
32,556 Expert Mod 16PB
First (if it's really worth it to you), go to the VBA window (Alt-F11 from the Access window) and select 'References...' from the 'Tools' menu.
From the list there, make sure 'Microsoft Excel 9.0 Object Library' (or the equivalent for your version of Office) is ticked.
Now you can use the function Pi() as Excel.WorksheetFunction.Pi().
It's a lot of fuss for one function, but worth it if you're going to use other Excell worksheet functions.
Nov 2 '06 #3
PEB
1,418 Expert 1GB
Well done NeoPa!

It's very usefull information...

In fact I prefer to use the ordinary libraries that are installed on the computers... Coz in my installation should have the respective references...



First (if it's really worth it to you), go to the VBA window (Alt-F11 from the Access window) and select 'References...' from the 'Tools' menu.
From the list there, make sure 'Microsoft Excel 9.0 Object Library' (or the equivalent for your version of Office) is ticked.
Now you can use the function Pi() as Excel.WorksheetFunction.Pi().
It's a lot of fuss for one function, but worth it if you're going to use other Excell worksheet functions.
Nov 4 '06 #4
ADezii
8,834 Expert 8TB
Hi

I need to use the function PI() in a qAccess query....Problem I can not find a function called PI. The function exists in EXCEL. I can use 22/7 or 3.14159...but it would be much easier to use the standard function.

Am I missing it or not looking in the correct Help menu?
The value of PI can be derived in the following fashion, either declaring it as
a Global Constant or as such:

Dim PI As Double
Expand|Select|Wrap|Line Numbers
  1. PI = 4 * Atn(1)
Nov 4 '06 #5
NeoPa
32,556 Expert Mod 16PB
In fact I prefer to use the ordinary libraries that are installed on the computers... Coz in my installation should have the respective references...
I wouldn't recomment that myself even PEB, but the library should be there available assuming Office (and not just Access) has been installed. It's just that the Refernce would have to be added to the database.

I agree though, that using the native functions only, makes implementation much easier.
Nov 4 '06 #6
Hi,

Thanks very much for the info RE PI()...I have decided just to use the value of 3.141592654 it was eaiser.
Nov 6 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

52
by: Dick Moores | last post by:
I need to figure out how to compute pi to base 12, to as many digits as possible. I found this reference, <http://mathworld.wolfram.com/Base.html>, but I really don't understand it well enough....
20
by: Kraig | last post by:
Hi! I'm new to programming and am trying to figure out the best way using loops, to compute pi to say, 14 terms using values that double each time through the loop. As in, from 1-2-4-8-16, et al....
4
by: Ina Schmitz | last post by:
Hi all, is there any possibility to use pi() (3.14...) like it is in SQL Server in a query to a DB2 database? How is the syntax therefore? Thanks for good ideas! Cheers, Ina
15
by: Michel Rouzic | last post by:
I tried making a function that would fill half of an array with random doubles that would go from -pi to +pi. Unfortunatly, all it ever returns is -pi. I haven't used an already existing random...
27
by: Matt | last post by:
Does the language have header files containing definitions of numbers such as pi and e? I believe some implementations used to have those, but I can't find them in Stroustrup. Thanks.
7
by: Bala L | last post by:
I have a class with a private array data member 'm_array'. I have written a public function, called 'fileRead', to read values into the array from a file. I just noticed that I have declared this...
8
by: kpfunf | last post by:
I have the following functions: Option Compare Database Option Explicit Public Function CalculateDistance(Lat1, Lon1, Lat2, Lon2) As Double Dim a, b, c, x As Double Const PI = 3.14159265358979...
42
by: aarklon | last post by:
Hi all, see:- http://mathforum.org/library/drmath/view/54456.html
10
by: lasmith329 | last post by:
I've never posted a question on any site before, but after racking my head over this hurdle for days, I've caved. I'm working on a program that creates a kml file and exports it to Google Earth. In...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.