P
Paul Johnson
Is it possible to pass a RecordsSet object to a sub as a parameter? I took
some trial-and-error stabs at this, and couldn't make it work. I tried
passing objects ByVal and ByRef, but the understanding of these differences
is a little beyond me. As a workaround, I ended up passing a query
statement as a string value to the sub, and the sub then opened a recordset
with CurrentDb.OpenRecordSet(strSQL), and that worked fine. I'm just asking
out of curiosity.
As I think about it, I like the workaround idea, because I know that the
recordset object only has scope in the sub that creates it from the string--
it's not being created in one place and passed around to other subs.
Are there any good references or articles that will shed some light on this?
TIA
Paul Johnson
some trial-and-error stabs at this, and couldn't make it work. I tried
passing objects ByVal and ByRef, but the understanding of these differences
is a little beyond me. As a workaround, I ended up passing a query
statement as a string value to the sub, and the sub then opened a recordset
with CurrentDb.OpenRecordSet(strSQL), and that worked fine. I'm just asking
out of curiosity.
As I think about it, I like the workaround idea, because I know that the
recordset object only has scope in the sub that creates it from the string--
it's not being created in one place and passed around to other subs.
Are there any good references or articles that will shed some light on this?
TIA
Paul Johnson