L
Leslie Coover
When using functions to calculate values based on field values in a query is
it neccessary to declare each query field in each function, or can they be
declared as public variables?
For example, must I do the following?
Function DiscRate(Purchase_Price As Currency, Pro_Cur_Val As Currency,
DateDifference As Double, Type As String, SumOfCashFlow As Currency,
Coupon As Double, M As Double)
<<code goes here>>
End Function
Function LowMFrate (Purchase_Price As Currency, Pro_Cur_Val As Currency)
<<code goes here>>
End Function
Or, can I do the following?
Option Compare Database
Option Explicit
Dim Purchase_Price As Currency
Dim Pro_Cur_Price As Currency
Dim DateDifference As Double
Dim Type As String
Dim SumOfCashFlow As Currency
Dim Coupon As Double
Dim M As Double
Function DiscRate ()
<<code goes here>>
End Function
Function LowMFrate
<<code goes here>>
End Function
Remember the names I am declaring are the names of fields in a query
(the place where I get the data to use in calculations)
Thanks!!!
it neccessary to declare each query field in each function, or can they be
declared as public variables?
For example, must I do the following?
Function DiscRate(Purchase_Price As Currency, Pro_Cur_Val As Currency,
DateDifference As Double, Type As String, SumOfCashFlow As Currency,
Coupon As Double, M As Double)
<<code goes here>>
End Function
Function LowMFrate (Purchase_Price As Currency, Pro_Cur_Val As Currency)
<<code goes here>>
End Function
Or, can I do the following?
Option Compare Database
Option Explicit
Dim Purchase_Price As Currency
Dim Pro_Cur_Price As Currency
Dim DateDifference As Double
Dim Type As String
Dim SumOfCashFlow As Currency
Dim Coupon As Double
Dim M As Double
Function DiscRate ()
<<code goes here>>
End Function
Function LowMFrate
<<code goes here>>
End Function
Remember the names I am declaring are the names of fields in a query
(the place where I get the data to use in calculations)
Thanks!!!