By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,058 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,058 IT Pros & Developers. It's quick & easy.

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

P: 9
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.Connection
Private m_conEXTT As ADODB.Connection
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(Cancel As Integer)
m_conOra.Close
Set m_conOra = Nothing
m_conEXTT.Close
Set m_conEXTT = Nothing
End Sub
Nov 1 '06 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
Which line produces the error?
Nov 1 '06 #2

scripto
100+
P: 143
neither one of your databases were opened, so you will get an error when you call .Close()
Nov 1 '06 #3

sashi
Expert 100+
P: 1,754
Hi there,

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

http://www.thescripts.com/forum/thread13693.html
Nov 1 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.