P
Phil
Im trying to write a function:
Function aScan(
p_ArrayName,
eExpression As Variant,
Optional nStartElement As Integer,
Optional nElementsSearched,
Optional nSearchColumn) as integer
to Search an array for an element containing the same data
and data type as an expression.
Since I don't know how big the array is, or how many
dimensions it has, I can't simply do the following:
aScan = -1
For i = int_lBound To int_uBound - 1
If p_ArrayName(i) = eExpression Then
aScan = i
End If
Next
I have the sense that I should try to ReDim the array;
scan it as 1 dimension as above, and then ReDim it back.
Is this a correct approach or is there some simpler way?
If this function is a correct approach, it seems like it
should be one of the foundations for my array
manipulations in Access.
If not, advice or direction on generic array manipulations
would be helpful.
Thanks for your help.
Phil
Function aScan(
p_ArrayName,
eExpression As Variant,
Optional nStartElement As Integer,
Optional nElementsSearched,
Optional nSearchColumn) as integer
to Search an array for an element containing the same data
and data type as an expression.
Since I don't know how big the array is, or how many
dimensions it has, I can't simply do the following:
aScan = -1
For i = int_lBound To int_uBound - 1
If p_ArrayName(i) = eExpression Then
aScan = i
End If
Next
I have the sense that I should try to ReDim the array;
scan it as 1 dimension as above, and then ReDim it back.
Is this a correct approach or is there some simpler way?
If this function is a correct approach, it seems like it
should be one of the foundations for my array
manipulations in Access.
If not, advice or direction on generic array manipulations
would be helpful.
Thanks for your help.
Phil