Passing ADO Recordset ByVal
Can anyone shed any light on this for me?
I am passing an ADO Recordset to a function (which basically scans through, performs some logic and then returns an Array of Record ID's based on the logic result). I am passing the Recordset to it ByVal, as I not want the cursor to move in the Recordset, I just want the results.
However, it appears that it is actually still being passed ByRef??
.EOF is False before calling the procedure, and True once the procedure has completed. Of course, I know VBA is ByRef by default, and I have put ByVal in the parameters for the function.
Does anyone know of ByVal being overridden for ADO Objects? Could it be because of the Cursor Type/Location etc? The recordset passed is a ROFO (read-only, forward only) Recordset.
Just curious as to why this is occurring, I can work around it, but confused as to why I should!