Solved

Calculate a number to the nth power

Posted on 2004-04-16
2
1,592 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

861 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