debug this problem ' run-time error '91': object variable or with block variable not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • christine0207
    New Member
    • Aug 2006
    • 9

    #1

    debug this problem ' run-time error '91': object variable or with block variable not

    hi

    Can anyone help to debug this problem?

    the error msg is run-time error '91':
    object variable or with block variable not set.

    here is my source code:

    Option Explicit
    Private m_conOra As ADODB.Connectio n
    Private m_conEXTT As ADODB.Connectio n
    Private m_strStatus As String
    Private m_strDate As String

    Private Sub Form_Load()

    Set m_conOra = ConnectMe ' Connect DataBase
    Set m_conEXTT = Connect_EXTT ' Connect EXIT DataBase

    Private Sub Form_Unload(Can cel As Integer)
    m_conOra.Close
    Set m_conOra = Nothing
    m_conEXTT.Close
    Set m_conEXTT = Nothing
    End Sub
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Which line produces the error?

    Comment

    • scripto
      New Member
      • Oct 2006
      • 143

      #3
      neither one of your databases were opened, so you will get an error when you call .Close()

      Comment

      • sashi
        Recognized Expert Top Contributor
        • Jun 2006
        • 1749

        #4
        Hi there,

        Kindly refer to below attached link, hope it helps. Good luck & take care.

        Comment

        Working...