📄 frmzxqkqrsearch.frm
字号:
VERSION 5.00
Begin VB.Form FrmZXQKQRSearch
BorderStyle = 1 'Fixed Single
Caption = "查询条件"
ClientHeight = 1875
ClientLeft = 3540
ClientTop = 2835
ClientWidth = 4335
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 1875
ScaleWidth = 4335
Begin VB.ListBox List1
Height = 960
ItemData = "FrmZXQKQRSearch.frx":0000
Left = 2040
List = "FrmZXQKQRSearch.frx":0002
TabIndex = 5
Top = 360
Visible = 0 'False
Width = 2055
End
Begin VB.TextBox Text12
Height = 285
Left = 2040
TabIndex = 4
Top = 120
Visible = 0 'False
Width = 2055
End
Begin VB.CheckBox Check2
Caption = "合同名称"
Height = 255
Left = 360
TabIndex = 3
Top = 720
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "合同编号"
Height = 255
Left = 360
TabIndex = 2
Top = 360
Width = 1095
End
Begin VB.CommandButton CNDOK
Caption = "确定"
Height = 375
Left = 2520
TabIndex = 1
Top = 1440
Width = 735
End
Begin VB.CommandButton CMDCancel
Caption = "取消"
Height = 375
Left = 3360
TabIndex = 0
Top = 1440
Width = 735
End
End
Attribute VB_Name = "FrmZXQKQRSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
HTGL.Enabled = True
Unload Me
End Sub
Private Sub CNDOK_Click()
If Check1.Value = 0 And Check2.Value = 0 Then
GoTo 1000
End If
If Text12.Text = "" Then
MsgBox "合同编号不能为空!"
Exit Sub
End If
If Check1.Value = 1 Then
Sql = "select * from 签定合同概要表 where 合同编号='" & Text12.Text & "'"
Set rs = ConnWZ.Execute(Sql)
End If
If Check2.Value = 1 Then
Sql = "select * from 签定合同概要表 where 合同名称='" & Text12.Text & "'"
Set rs = ConnWZ.Execute(Sql)
End If
If Not rs.EOF Then
GLHTBH = rs("合同编号")
Else
MsgBox "合同编号不正确!"
Exit Sub
End If
1000: FrmZXQKQR.Show
Unload Me
End Sub
Private Sub Form_Load()
For Each TextBox In Me.Controls
Next
End Sub
Private Sub List1_MouseDown(Button As Integer, shift As Integer, X As Single, Y As Single)
i = List1.ListIndex
Text12 = List1.List(i)
End Sub
Private Sub Text12_Change()
Str1 = Text12.Text
Cont = Len(Str1)
For i = 0 To List1.ListCount - 1
If Left$(List1.List(i), Cont) = Str1 Then
List1.ListIndex = i
GoTo 100
End If
Next
100:
End Sub
Private Sub Check1_Click()
List1.Visible = False
Text12.Visible = False
List1.Clear
Text12.Text = ""
If Check1.Value = 1 Then
Check2.Value = 0
List1.Visible = True
Text12.Visible = True
Sql = "select * from 签定合同概要表 where 执行完毕='未完毕' order by 合同编号"
Set rs = ConnWZ.Execute(Sql)
Do While Not rs.EOF
List1.AddItem rs("合同编号")
rs.MoveNext
Loop
End If
End Sub
Private Sub Check2_Click()
List1.Visible = False
Text12.Visible = False
List1.Clear
Text12.Text = ""
If Check2.Value = 1 Then
Check1.Value = 0
List1.Visible = True
Text12.Visible = True
Sql = "select * from 签定合同概要表 where 执行完毕='未完毕' order by 合同名称"
Set rs = ConnWZ.Execute(Sql)
Do While Not rs.EOF
List1.AddItem rs("合同名称")
rs.MoveNext
Loop
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -