runtime error 91

object variable or with block variable not set

Page 1 of 1

1 Replies - 914 Views - Last Post: 04 October 2009 - 08:20 PM Rate Topic: -----

#1 exekiel  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 02-October 09

runtime error 91

Post icon  Posted 04 October 2009 - 08:10 PM

may someone do help to debug my project cause when i runned my program it always show the same error on my form 2 of my project which is object variable or with block variable not set,,,thanks for someone who will give time to view and debug my problem..


Private Sub cmd_backtank1_Click()
Unload Me
Form1.Show
End Sub


Public Sub cmd_enter_Click()

Adodc1.Recordset.Fields("tank_number") = lbl_tank1.Caption
Adodc1.Recordset.Fields("date") = lbl_date.Caption
Adodc1.Recordset.Fields("time") = lbl_time.Caption

Adodc1.Recordset.Fields("updates") = txt_valuetank1.Text
Adodc1.Recordset.Save

If txt_valuetank1.Text = "100" Or txt_valuetank1.Text >= 95 Then
Shape1.Visible = True
Else
If txt_valuetank1.Text >= "94" Or txt_valuetank1.Text >= 85 Then
Shape6.Visible = True
Else
If txt_valuetank1.Text >= "84" Or txt_valuetank1.Text >= 75 Then
Shape2.Visible = True
Else
If txt_valuetank1.Text >= "74" Or txt_valuetank1.Text >= 65 Then
Shape7.Visible = True
Else
If txt_valuetank1.Text >= "64" Or txt_valuetank1.Text >= 55 Then
Shape3.Visible = True
Else
If txt_valuetank1.Text >= "54" Or txt_valuetank1.Text >= 45 Then
Shape8.Visible = True
Else
If txt_valuetank1.Text >= "44" Or txt_valuetank1.Text >= 35 Then
Shape4.Visible = True
Else
If txt_valuetank1.Text >= "34" Or txt_valuetank1.Text >= 25 Then
Shape9.Visible = True
Else
If txt_valuetank1.Text >= "24" Or txt_valuetank1.Text >= 15 Then
Shape5.Visible = True
MsgBox "warning low oxygen supply", vbOKOnly
Else
If txt_valuetank1.Text >= "14" Or txt_valuetank1.Text >= 5 Then
Shape10.Visible = True
MsgBox "warning low oxygen supply", vbOKOnly
Else
If txt_valuetank1.Text >= "4" Or txt_valuetank1.Text >= 0 Then
Shape11.Visible = True
MsgBox "change tank", vbOKOnly
Else
MsgBox "cant be allocated", vbOKOnly
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

End Sub

Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\maricel\db3.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from monitor"
Adodc1.Recordset.AddNew
lbl_tank1.Caption = Form5.lbl_tank1.Caption
lbl_date.Caption = Date
lbl_time.Caption = Time
End Sub




Is This A Good Question/Topic? 0
  • +

Replies To: runtime error 91

#2 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: runtime error 91

Posted 04 October 2009 - 08:20 PM

Looks like a VB6 programming question. Moving this there.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1