M
Matt
Hi All,
I have a function that returns an array of doubles. I want to call
this function from a query and return the index's across 3 different
query fields. Something like:
SELECT getGainUsed([Import Date],[Owner SSN],[Contract Number])(0),
getGainUsed([Import Date],[Owner SSN],[Contract
Number])(1),getGainUsed([Import Date],[Owner SSN],[Contract Number])(2)
FROM .....
I know that this would work if the getGainUsed function returned simply
a double (with the index removed) but I can not to seem to get it to
work for an array.
For testing purposes, I have created this simple function:
..
..
..
Public Function getGainUsed(importDate As Date, ssn As String, contract
As String)
Dim arrValues(2) As Double
arrValues(0) = 0.1
arrValues(1) = 1.1
arrValues(2) = 2.1
getGainUsed = arrValues
End Function
..
..
..
When I try to reference an index of this array, as I do in the above
SQL statement, I get #Error's
What am I doing wrong?
Any help is appreciated!!!!!!!!!
I have a function that returns an array of doubles. I want to call
this function from a query and return the index's across 3 different
query fields. Something like:
SELECT getGainUsed([Import Date],[Owner SSN],[Contract Number])(0),
getGainUsed([Import Date],[Owner SSN],[Contract
Number])(1),getGainUsed([Import Date],[Owner SSN],[Contract Number])(2)
FROM .....
I know that this would work if the getGainUsed function returned simply
a double (with the index removed) but I can not to seem to get it to
work for an array.
For testing purposes, I have created this simple function:
..
..
..
Public Function getGainUsed(importDate As Date, ssn As String, contract
As String)
Dim arrValues(2) As Double
arrValues(0) = 0.1
arrValues(1) = 1.1
arrValues(2) = 2.1
getGainUsed = arrValues
End Function
..
..
..
When I try to reference an index of this array, as I do in the above
SQL statement, I get #Error's
What am I doing wrong?
Any help is appreciated!!!!!!!!!