Charlotte Foust
charlotte.foust at gmail.com
Sat Sep 3 23:06:38 CDT 2011
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