[AccessD] ParamArray problem

Ken Ismert KIsmert at TexasSystems.com
Thu Mar 11 18:52:11 CST 2004


John,

Since variants can hold objects, and ParamArrays hold variants, I see no
reason why you can't pass a ParamArray of objects in  your code.

What version of Access are you using? I made this simple code in A2K, SP3:

Private Sub TestParamArraySub(ByRef rObj As Object, ParamArray vParms() As
Variant)
    Dim vParm As Variant
    Debug.Print "LBound: " & LBound(vParms), "UBound: " & UBound(vParms)
    For Each vParm In vParms()
        Debug.Print vParm
    Next
End Sub

When I call it with TestParamArraySub Nothing, I get:
    LBound: 0     UBound: -1

I traced it, and the Debug.Print does not get executed with an empty
ParamArray. In other words, correct operation.

Is this a service pack or update issue? Perhaps you should decompile?

-Ken




More information about the AccessD mailing list