[AccessD] Feeding an paramarray to a paramarray

Drew Wutka DWUTKA at Marlow.com
Wed Mar 12 15:34:57 CDT 2008


I hear ya. Not sure where I would use a ParamArray in stuff I do now
anyways.  It's a neat idea, but it seems that it is really designed to
allow you to have multiple arguments to a function, without having to
define them.

Most of my logic is done in classes now, any functions I use are pretty
straightforward, no need to be all that flexible.

Drew


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, March 12, 2008 1:22 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Feeding an paramarray to a paramarray

Well I'm sure it would except I already have a solution that is in place
and
works - unpacking the array into a collection and passing the collection
from that point.  A collection can be passed to a function that is
expecting
a collection, which can pass it to a function expecting a collection.
IOW
from the point that the array is unpacked into a collection, the
collection
can be passed as far down a function call chain as necessary without
further
worry, and always used with a simple for each iterator.

A paramarray cannot be passed down a function call chain expecting a
paramarray (without work in the receiving function).  Neither your
solution
or mine "just works", both require interior code to perform a conversion
at
some level.  The method I use requires the conversion once, at the top
level.  Passing a param array requires that conversion at each level of
the
chain.  

What I was trying to discover with the thread was whether there is
"syntax"
built into VBA that allows me to pass a paramarray to a paramarray and
use
the passed in array directly and without further decomposition.  There
is
not.

Personally if I have to perform a conversion, I prefer to convert to a
collection and pass that.  The conversion to a collection is trivial and
readable.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list