PrivateSubAddInfra()
WithAdodc1
.RecordSource="select*fromt_Infra_red"
.Recordset.AddNew
.Recordset.Fields("Device_id")=2
.Recordset.Fields("Dtime")=Date+Time
.Recordset.Fields("Infra")=infra
.Recordset.Update
EndWith
EndSub
PrivateSubAddAlc()
WithAdodc2
.RecordSource="select*fromt_Alcohol"
.Recordset.AddNew
.Recordset.Fields("Device_id")=3
.Recordset.Fields("Dtime")=Date+Time
.Recordset.Fields("Alcohol")=alc
.Recordset.Update
EndWith
EndSub
PrivateSubAddPho()
WithAdodc3
.RecordSource="select*fromt_Photosensitive"
.Recordset.AddNew
.Recordset.Fields("Device_id")=4
.Recordset.Fields("Dtime")=Date+Time
.Recordset.Fields("Photosensitive")=pho
.Recordset.Update
EndWith
EndSub
PrivateSubAddTH()
WithAdodc4
.RecordSource="select*fromt_TemHum"
.Recordset.AddNew
.Recordset.Fields("Device_id")=5
.Recordset.Fields("Dtime")=Date+Time
.Recordset.Fields("Temperature")=tem
.Recordset.Fields("Humidity")=hum
.Recordset.Update
EndWith
EndSub
PrivateSubAddUlt()
WithAdodc5
.RecordSource="select*fromt_Ultrasonic_wave"
.Recordset.AddNew
.Recordset.Fields("Device_id")=6
.Recordset.Fields("Dtime")=Date+Time
.Recordset.Fields("Ultrasonic")=ult
.Recordset.Update
EndWith
EndSub
Ifinfra<>""ThenCallPicture2_ClickElseIfalc<>""ThenCallPicture3_ClickElseIfpho<>""ThenCallPicture4_ClickElseIfth<>""ThenCallPicture5_ClickElseIfult<>""ThenCallPicture6_ClickEndIf
原文链接:https://www.f2er.com/vb/258915.html