R
RJ
Dim CMD As ADODB.Command
Set CMD = Build_SP_Command("spfm_User_SalesLeadSearch_Dynamic")
Execute_SQL_GetRows_Command (CMD)
Set CMD = Nothing
Public Function Execute_SQL_GetRows_Command(CMD As ADODB.Command)
......
End Function
When the above code executes it blows immediately on the
Execute_SQL_GetRows_Command giving a type mismatch error using the
adodb.command as a passed parameter. I know that the Set CMD = ... is
functioning properly; I use it throughout the project without any problem. I
tried throwing a ByRef/Byval at the function but that didn't help. I have
several functions that return an adodb.command from a function , however this
is the first time I am trying to pass an ADODB.Command to a function.
Any ideas on the correct syntax for passing an ADODB.Command to a
sub/function?
Thanks for your help!
Set CMD = Build_SP_Command("spfm_User_SalesLeadSearch_Dynamic")
Execute_SQL_GetRows_Command (CMD)
Set CMD = Nothing
Public Function Execute_SQL_GetRows_Command(CMD As ADODB.Command)
......
End Function
When the above code executes it blows immediately on the
Execute_SQL_GetRows_Command giving a type mismatch error using the
adodb.command as a passed parameter. I know that the Set CMD = ... is
functioning properly; I use it throughout the project without any problem. I
tried throwing a ByRef/Byval at the function but that didn't help. I have
several functions that return an adodb.command from a function , however this
is the first time I am trying to pass an ADODB.Command to a function.
Any ideas on the correct syntax for passing an ADODB.Command to a
sub/function?
Thanks for your help!