First up, is it possible to pass a set of values into a function as an array
ie: qryTest has var1 var2 var3 var4
Can I pass it into a function that looks like this:
And just do this in my Query:
I know obviously the way I've written it it won't work, but is there some variant of that that will? The reason I'm doing this is I have to pass 50 variables into 1 function (48 monthly comparison variables and 2 identifiers) and Access won't let me do it. What would be another way of doing this that works? I've tried global arrays with no luck (I'm sure I COULD use them but it's a bit sticky) so how can I do this?
Any help is MUCH appreciated!
Thanks
ie: qryTest has var1 var2 var3 var4
Can I pass it into a function that looks like this:
Code:
Public Function FunctionTest(varArray())
...etc
End Function
And just do this in my Query:
Code:
Field1: FunctionTest(varArray([var1], [var2],[var3]))
I know obviously the way I've written it it won't work, but is there some variant of that that will? The reason I'm doing this is I have to pass 50 variables into 1 function (48 monthly comparison variables and 2 identifiers) and Access won't let me do it. What would be another way of doing this that works? I've tried global arrays with no luck (I'm sure I COULD use them but it's a bit sticky) so how can I do this?
Any help is MUCH appreciated!
Thanks