I am getting a type mismatch on the highlighted. Do I need to set both the connection and recordset even though they are Dimmed public?
VB Code:
  1. Public Sub CloseConnection()
  2.     'Set m_ADORs = New ADODB.Recordset
  3.     'Set m_ADOCon = New ADODB.Connection
  4.    
  5.     If [hl]m_ADORs[/hl] = adStateOpen Then
  6.         m_ADORs.Close
  7.     End If
  8.    
  9.     Set m_ADORs = Nothing
  10.    
  11.     If m_ADOCon = adStateOpen Then
  12.         m_ADOCon.Close
  13.     End If
  14.    
  15.     Set m_ADOCon = Nothing
  16. End Sub