We help IT Professionals succeed at work.
Get Started

Global  Function 2

pdvsa
pdvsa asked
on
616 Views
Last Modified: 2013-11-29
I want to call a function from a report and not have to worry about putting any part of the calculation in the query like I always do.  It takes too much time.  I want to simply put the USDEquivFX in the name of the report and it calculates.  

I have a global function:
Function USDEquivFX(lngID As Long, dblAmount As Double, dblRate As Double) As Double

         If lngID = 1 Then
               USDEquivFX = dblAmount
         Else
               USDEquivFX = dblAmount * dblRate
         End If
End Function


Isnt there some way to use the Function calculation only (like USDEquivFX..FX is for Function) and not have to put *any* components of the calculation in the query design?  I have many reports that need I have to repeat with this calculation.  I only want to calculate in the function and be done with it and be able to call it anywhere.  


untitled.JPG
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2013
Commented:
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE