?? mhcx.frm
字號:
VERSION 5.00
Begin VB.Form mhcx
Caption = "Form1"
ClientHeight = 2265
ClientLeft = 60
ClientTop = 450
ClientWidth = 8940
LinkTopic = "Form1"
ScaleHeight = 2265
ScaleWidth = 8940
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "返回"
Height = 375
Left = 5760
TabIndex = 7
Top = 1680
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "查詢"
Height = 375
Left = 3840
TabIndex = 6
Top = 1680
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "清除"
Height = 375
Left = 1920
TabIndex = 5
Top = 1680
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 4
Top = 960
Width = 8415
End
Begin VB.ComboBox Combo4
Height = 300
ItemData = "mhcx.frx":0000
Left = 7800
List = "mhcx.frx":000A
TabIndex = 3
Top = 360
Width = 855
End
Begin VB.ComboBox Combo3
Height = 300
Left = 4080
TabIndex = 2
Top = 360
Width = 3615
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "mhcx.frx":0016
Left = 240
List = "mhcx.frx":0023
TabIndex = 1
Top = 360
Width = 2175
End
Begin VB.ComboBox combo2
Height = 300
ItemData = "mhcx.frx":0045
Left = 2520
List = "mhcx.frx":0055
TabIndex = 0
Top = 360
Width = 1215
End
End
Attribute VB_Name = "mhcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
If Trim(Combo1.Text) = "證書編號" Then
Text1 = Text1 + "zsbh"
Combo2.Text = ""
End If
If Trim(Combo1.Text) = "委托單位" Then
Combo3.Clear
strsql = "select sy,wtdwmc from wtdwb"
grs.Open strsql, conn, adOpenKeyset, adLockReadOnly, adCmdText
fillcombo Combo3, grs
grs.Close
Text1 = Text1 + "wtdwmc"
End If
If Trim(Combo1.Text) = "儀器名稱" Then
Combo3.Clear
strsql = "select sy,yqmc from yqmcb"
grs.Open strsql, conn, adOpenKeyset, adLockReadOnly, adCmdText
fillcombo Combo3, grs
grs.Close
Text1 = Text1 + "yqmc"
End If
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
End Sub
Private Sub combo2_Click()
If Len(Combo1.Text) <> 0 Then
Select Case Combo2.ListIndex
Case 0
Text1 = Text1 + " = "
Case 1
Text1 = Text1 + " > "
Case 2
Text1 = Text1 + " < "
Case 3
Text1 = Text1 + " like "
End Select
End If
End Sub
Private Sub Combo3_Click()
If Trim(Combo1.Text) = "委托單位" Or Trim(Combo1.Text) = "儀器名稱" Then
If Combo2.Text = "like" Then
Text1 = Text1 & "'%" + Trim(Combo3.Text) + "%'"
Else
Text1 = Text1 & "'" & Trim(Combo3.Text) & "'"
End If
End If
End Sub
Private Sub Combo3_KeyPress(KeyAscii As Integer)
If Trim(Combo1.Text) = "證書編號" Then
If KeyAscii = 13 Then
If Combo2.Text = "象" Then
Text1 = Text1 & "'%" + Trim(Combo3.Text) + "%'"
Else
Text1 = Text1 & "'" & Trim(Combo3.Text) & "'"
End If
End If
End If
End Sub
Private Sub Combo4_Click()
If Combo4.ListIndex = 0 Then
Text1 = Text1 + " and "
End If
If Combo4.ListIndex = 1 Then
Text1 = Text1 + " or "
End If
End Sub
Private Sub Command1_Click()
Text1 = ""
End Sub
Private Sub Command2_Click()
cxtj = Trim(Text1)
caxunbj = 1
jdzsb.Show 1
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Move (main.Width - Me.Width) / 2, (main.Height - Me.Height) / 2
Select Case caxiun
Case 1 '按證書編號查詢
Label1.Caption = "按證書編號查詢"
Case 2 '按委托單位查詢
Label1.Caption = "按委托單位查詢"
Case 3 '按儀器名稱查詢
Label1.Caption = "按儀器名稱查詢"
End Select
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -