[AccessD] Feeding an paramarray to a paramarray

jwcolby jwcolby at colbyconsulting.com
Wed Mar 12 13:22:15 CDT 2008


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 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
Sent: Wednesday, March 12, 2008 1:10 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Feeding an paramarray to a paramarray

Not really, but I'm like House when it comes to code, when I see a problem
that I find intriguing, I have to fix it! ;)

So, did this help ya?

Drew




More information about the AccessD mailing list