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
runtime error 91object variable or with block variable not set
Page 1 of 1
3 Replies - 780 Views - Last Post: 09 October 2009 - 02:44 AM
#1
runtime error 91
Posted 05 October 2009 - 12:13 AM
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..
Replies To: runtime error 91
#3
Re: runtime error 91
Posted 06 October 2009 - 02:33 AM
olibenu, on 5 Oct, 2009 - 01:20 AM, said:
which line gives the error
in this line have an error
Adodc1.Recordset.Fields("tank_number") = lbl_tank1.Caption
Adodc1.Recordset.Fields("date") = lbl_date.Caption
Adodc1.Recordset.Fields("time") = lbl_time.Caption
Adodc1.Recordset.Addnew
after i remove that code my program do run smoothly without error..
#4
Re: runtime error 91
Posted 09 October 2009 - 02:44 AM
check the fields are available in the table or check whether it is in eof or bof
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|