标题:大神门帮帮忙啊。。这个实时错误是啥意思啊。怎么改啊。
取消只看楼主
YoYoLcc
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2017-4-27
结帖率:0
已结贴  问题点数:20 回复次数:0 
大神门帮帮忙啊。。这个实时错误是啥意思啊。怎么改啊。

Private Sub Timer1_Timer()

If MSComm1.InBufferCount = 6 Then
MSComm1.InputLen = 2
Text1.Text = MSComm1.Input
Text2.Text = MSComm1.Input
Text5.Text = MSComm1.Input


If Val(Text5.Text) = 1 Then
Shape4.BackColor = RGB(0, 255, 0)
End If
If Val(Text5.Text) = 0 Then
Shape4.BackColor = RGB(255, 0, 0)
End If

SD = y
y = Val(Text2.Text)

Picture1.Line (x + 9, 100 - y)-(x, 100 - SD)
x = x + 9
    If x >= 120 Then
    Picture1.Cls
    x = 0
    End If
   
If Val(Text2.Text) > Val(Text4.Text) Then
Shape2.BackColor = RGB(255, 0, 0)
Else
Shape2.BackColor = RGB(0, 255, 0)
End If

If Val(Text2.Text) < Val(Text3.Text) Then
Shape3.BackColor = RGB(255, 0, 0)

Else
Shape3.BackColor = RGB(0, 255, 0)
End If
   If Val(Text5.Text = 2) & Val(Text2.Text) < Val(Text3.Text) Then
    buff(0) = &H3
    MSComm1.Output = buff
    End If
    If Val(Text5.Text = 1) & Val(Text2.Text) >= Val(Text3.Text) Then
    buff(0) = &H4
    MSComm1.Output = buff

    End If

Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("时间") = Now
Adodc1.Recordset.Fields("温度") = Val(Text1.Text)
Adodc1.Recordset.Fields("湿度") = Val(Text2.Text)
Adodc1.Recordset.Update//这句话报错 实时错误 80004005
End If

End Sub
搜索更多相关主题的帖子: If Then Text RGB End 
2017-04-27 19:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-476491-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.391263 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved