|
-
Oct 11th, 2001, 03:07 PM
#1
Thread Starter
Addicted Member
Passing Recordsets
Can any one tell me how to pass an open Recordset as a parameter? I have tried the following...
private sub SUB1()
'dim and open a rs called RS1
bResult = MyFunction(RS1)
'close recordset and move on
end sub
Public MyFunction(ByVal RS2 as ADODB.Recordset) as Boolean
RS2.open
'do something with the recordset
RS2.close
MyFunction = True
End Function
The RS2.Open fails to execute. If I move the call below the close recordset in SUB1 it works just fine. I have tried passing it ByVal and ByRef.
Any assistance would be appreciated!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|