Ok. We got a little farther. The sp executes and no error
requesting a parameter. I do get error stating that "Operation
not allowed when object is open." It is refering to the line - Set
oRs.ActiveConnection = Nothing.

Also, I hade the logic backwards for the parameter - = instead of <>.
I could create another connection just for executing the sp's.
This is what is working.
VB Code:
  1. Public Function Exec_SPrs(ByRef oCnnS As ADODB.Connection, ByVal sp_Name As String, Optional ByVal sParam As String) As ADODB.Recordset
  2. '<RR 09/16/2003 - VB/OUTLOOK GURU>
  3.     On Error GoTo No_Bugs
  4.    
  5.     Dim oRs As ADODB.Recordset
  6.     Dim oCM As ADODB.Command
  7.     Dim oParam As ADODB.Parameter
  8.     Dim lRecs As Long
  9.    
  10.     Set oRs = New ADODB.Recordset
  11.     Set oCM = New ADODB.Command
  12.     Set oCM.ActiveConnection = oCnnS
  13.     oCM.CommandType = adCmdStoredProc
  14.     oCM.CommandText = sp_Name
  15.     If sParam <> "" Then
  16.         Set oParam = oCM.CreateParameter("@Task_No", adChar, adParamInput, 8, sParam)
  17.         oCM.Parameters.Append oParam
  18.     End If
  19. '    Set oRs = oCM.Execute(lRecs, sParam)
  20.     Set oRs = oCM.Execute 'Works this way now
  21.     Set Exec_SPrs = oRs
  22.     Set oRs.ActiveConnection = Nothing 'Error here
  23.     Set oParam = Nothing
  24.     Set oCM = Nothing
  25.     Exit Function
  26.    
  27. No_Bugs:
  28.    
  29.     MsgBox Err.Number & " - " & Err.Description, vbOKOnly + vbInformation, App.ProductName
  30. '    Resume
  31. End Function