jwcolby
jwcolby at colbyconsulting.com
Sun Sep 4 17:37:21 CDT 2011
It is familiar but I never knew how to pass them along. Suddenly it occurred to me... John W. Colby www.ColbyConsulting.com On 9/4/2011 12:06 AM, Charlotte Foust wrote: > It's been that way as long as there have been paramarrays, John. It may be > odd, but it's familiar odd. > > Charlotte Foust > > Charlotte > On Sep 3, 2011 10:10 AM, "jwcolby"<jwcolby at colbyconsulting.com> wrote: >> I use param arrays to allow me to pass in things like group ids that a > user might belong to. The >> following fails: >> >> Function mPLSUserInGroup(ParamArray Grps() As Variant) As Boolean >> mPLSUserInGroup = cPLS.cCurrUser.pUserInGrp(Grps) >> End Function >> >> However the following works: >> >> Function mPLSUserInGroup(ParamArray Grps() As Variant) As Boolean >> Dim lGrps() As Variant >> lGrps = Grps >> mPLSUserInGroup = cPLS.cCurrUser.pUserInGrp(lGrps) >> End Function >> >> Thus in order to push a paramarray into another function we just need to > dim an array, set it equal >> to the paramarray and then push that array on down. >> >> Pretty strange that a ParamArray cannot be directly passed along. >> >> -- >> John W. Colby >> www.ColbyConsulting.com >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com