Private Sub CmdFind_Click() '“查询”按键
If Text1.Text <> "" Then
If XDC.FileExists("C:\磁通阀\ " & Date & ".mdb") <> True Then
MsgBox "要查找的数据库文件不存在,请确认!", 64, "提示"
Else
'If Text1.Text <> shiyanname Then MsgBox "查询的不是此次试验数据!", 64, "提示"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\磁通阀\ " & Date & ".mdb ;Persist Security Info=False"
Adodc1.RecordSource = "SELECT * FROM " & Number
Adodc1.Refresh
Set MSHFlexGrid1.DataSource = Adodc1
Text3.Text = Adodc1.Recordset.RecordCount
shifou = True
End If
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有实验数据!", 64, "提示"
End If
If Text1.Text <> "" Then
If XDC.FileExists("C:\磁通阀\ " & Date & ".mdb") <> True Then
MsgBox "要查找的数据库文件不存在,请确认!", 64, "提示"
Else
'If Text1.Text <> shiyanname Then MsgBox "查询的不是此次试验数据!", 64, "提示"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\磁通阀\ " & Date & ".mdb ;Persist Security Info=False"
Adodc1.RecordSource = "SELECT * FROM " & Number
Adodc1.Refresh
Set MSHFlexGrid1.DataSource = Adodc1
Text3.Text = Adodc1.Recordset.RecordCount
shifou = True
End If
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有实验数据!", 64, "提示"
End If