Private Sub Cmd_que_Click()
Dim QueName As String
Dim strSQL As String
QueName = Trim(del_que.Text)
If QueName = "" Then
MsgBox "查询内容不能为空", vbOKOnly
Exit Sub
Else
OpenDB
strSQL = "Select * from Drug_info Where Drug_name ='" + QueName + "'"
objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
If objRS.EOF Then
MsgBox "没有所查询的药品", vbOKOnly
objRS.Close
CloseDB
Exit Sub
Else
Drug_name.Text = objRS.Fields(1).Value
'Drug_type.Text = objRS.Fields(2).Value
Import_price.Text = Str(objRS.Fields(3).Value)
Export_price.Text = Str(objRS.Fields(3).Value)
' Import_time.Text = Str(objRS.Fields(5).Value)
Drug_num.Text = Str(objRS.Fields(4).Value)
Prodcom.Text = objRS.Fields(6).Value
Prodplace.Text = objRS.Fields(7).Value
End If
End If
objRS.Close
CloseDB
End Sub
上一页 [1] [2] [3] [4] [5] [6] [7]