Private Sub Timer1_Timer()
Static iCount As Integer
iCount = iCount + 1
If iCount = 5 Then
Dim fn As Integer
fn = FreeFile()
If Len(Dir("c:\temp.txt")) = 0 Then
Open "c:\temp.txt" For Output As #fn
Else
Open "c:\temp.txt" For Append As #fn
End If
Write #fn, txtSendData.Text
Close #fn
iCount = 0
End If
End Sub
现要将TXTSendDate.Text中的内容存到当前文件夹中的ACCESS数据库中TABLE1表的wendu中,同时还要保存当前系统时间到TABLE1中的time中.查询时输入时间,就能显示当时的温度.
Static iCount As Integer
iCount = iCount + 1
If iCount = 5 Then
Dim fn As Integer
fn = FreeFile()
If Len(Dir("c:\temp.txt")) = 0 Then
Open "c:\temp.txt" For Output As #fn
Else
Open "c:\temp.txt" For Append As #fn
End If
Write #fn, txtSendData.Text
Close #fn
iCount = 0
End If
End Sub
现要将TXTSendDate.Text中的内容存到当前文件夹中的ACCESS数据库中TABLE1表的wendu中,同时还要保存当前系统时间到TABLE1中的time中.查询时输入时间,就能显示当时的温度.
定义个TEXT
隐藏,默认值为gettime()
将它和txtSendData一起动态绑定到TABLE1的time
点保存时 addnew()
查询就不用我说了