Solved

Calculate a number to the nth power

Posted on 2004-04-16
2
1,602 Views
Last Modified: 2009-03-10
I have a form that contains a field with a number I want to convert to a nth power. How do I write a VB to do this?

Thanks in advance for your help.
0
Comment
Question by:CatDaddy2003
2 Comments
 
LVL 26

Assisted Solution

by:Alan Warren
Alan Warren earned 250 total points
ID: 10842798
10^10 is ten to the tenth power

Alan
0
 
LVL 1

Accepted Solution

by:
danielmarkus earned 250 total points
ID: 10842841
public function MyPower(MyNumber as double, ThePower as double) as Double


MyPower = MyNumber ^ ThePower

end function
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question