📄 findtj.frm
字号:
VERSION 5.00
Begin VB.Form findtj
Caption = "条件查询"
ClientHeight = 1620
ClientLeft = 6525
ClientTop = 3045
ClientWidth = 7035
LinkTopic = "Form1"
ScaleHeight = 1620
ScaleWidth = 7035
Begin VB.Frame Frame2
Height = 735
Left = 5040
TabIndex = 4
Top = 840
Width = 1935
Begin VB.CommandButton Command1
Caption = "查 询"
Height = 375
Left = 120
TabIndex = 5
Top = 240
Width = 1695
End
End
Begin VB.Frame Frame1
Caption = "请选择条件"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 855
Left = 120
TabIndex = 0
Top = 0
Width = 6855
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4080
TabIndex = 3
Top = 360
Width = 2655
End
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2400
TabIndex = 2
Top = 360
Width = 1335
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 120
TabIndex = 1
Top = 360
Width = 2055
End
End
End
Attribute VB_Name = "findtj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Dim sql As String
Private Sub Command1_Click()
sql = "select * from info where "
If Combo1.text = "住址" Then
sql = sql & "address"
End If
If Combo1.text = "出生日期" Then
sql = sql & "birth"
End If
If Combo1.text = "身份证号" Then
sql = sql & "number"
End If
If Combo1.text = "职称" Then
sql = sql & "zhicheng"
End If
If Combo1.text = "职务" Then
sql = sql & "duty"
End If
If Combo1.text = "民族" Then
sql = sql & "nation"
End If
If Combo1.text = "电话" Then
sql = sql & "phone1"
End If
If Combo1.text = "性别" Then
sql = sql & "sex"
End If
If Combo1.text = "姓名" Then
sql = sql & "name"
End If
If Combo1.text = "编号" Then
sql = sql & "code"
End If
If Combo2.text = "大于" Then
sql = sql & ">"
End If
If Combo2.text = "小于" Then
sql = sql & "<"
End If
If Combo2.text = "等于" Then
sql = sql & "="
End If
If Combo2.text = "不等于" Then
sql = sql & "<>"
End If
If Combo2.text = "包括于" Then
sql = sql & " like '" & "%" & Trim(Text1.text) & "%" & "'"
Else
sql = sql & "'" & Trim(Text1.text) & "'"
End If
Call grid(rs, system.ListView1, system.StatusBar1, sql)
Unload Me
End Sub
Private Sub Form_Load()
Combo1.AddItem "编号"
Combo1.AddItem "姓名"
Combo1.AddItem "性别"
Combo1.AddItem "电话"
Combo1.AddItem "民族"
Combo1.AddItem "职务"
Combo1.AddItem "职称"
Combo1.AddItem "身份证号"
Combo1.AddItem "住址"
Combo1.AddItem "出生日期"
Combo2.AddItem "大于"
Combo2.AddItem "小于"
Combo2.AddItem "等于"
Combo2.AddItem "不等于"
Combo2.AddItem "包括于"
Combo1.ListIndex = 0
Combo2.ListIndex = 4
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -