Hi guys. Can anybody help me out here? I keep getting the above error when trying to open a recordset like so:

VBScript Code:
  1. Set connExcel = CreateObject("ADODB.Connection")
  2.     connExcel.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  3.                     "Data Source=" & Environment("API_Table") & ";" & _
  4.                     "Extended Properties=""Excel 8.0;IMEX=1;" & strHeader & """"
  5.  
  6. Set rsInputData = CreateObject("ADODB.Recordset")
  7.     rsInputData.Open "SELECT * FROM [" & strTblName & "$] WHERE Test_Case_ID ='" & strTestCaseID & "' AND " & _
  8.                     "Action='" & Environment("Action") & "'", connExcel, adOpenStatic
  9.  
  10. Set connAccess = CreateObject("ADODB.Connection")
  11. Set rsObjects = CreateObject("ADODB.Recordset")
  12.     connAccess.Provider = "Microsoft.JET.OLEDB.4.0"
  13.     connAccess.Open "C:\BFTC\Object Config\BFTC_ObjConf.mdb"
  14.  
  15. cntFields = rsInputData.Fields.Count
  16.  
  17. For ctrFields = 0 to cntFields - 1
  18.     If InStr(1, rsInputData.Fields(ctrFields).Value, "*") = 0 Then
  19.         curField = rsInputData.Fields(ctrFields).Name
  20.         curItem = rsInputData.Fields(curField).Value
  21.  
  22.         rsObjects.Open "SELECT * FROM " & strTblName & " WHERE FieldName='" & curField & "'", connAccess
  23.         If rsObjects.RecordCount > 0 Then
  24.         ...
  25.         End If
  26.         rsObjects.Close
  27.     End If
  28. Next   
  29.  
  30. rsInputData.Close
  31. connAccess.Close
  32. connExcel.Close
  33.  
  34. If rsObjects.State <> 0 Then
  35.     rsObjects.Close
  36. End If
  37.  
  38. Set rsObjects = Nothing
  39. Set rsInputData = Nothing
  40. Set connAccess = Nothing
  41. Set connExcel = Nothing

The error occurs when I'm trying to open the second recordset, rsObjects. I was wondering if this error is caused by the first connection and recordset objects (connExcel/rsInputData) still being opened when the second recordset is opened.

If I may also ask, if I close the rsInputData, the data from that query would be lost, right?