📄 frmsearch.frm
字号:
VERSION 5.00
Begin VB.Form frmSearch
BorderStyle = 1 'Fixed Single
Caption = "条件查找"
ClientHeight = 2310
ClientLeft = 45
ClientTop = 330
ClientWidth = 6960
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2310
ScaleWidth = 6960
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 5520
TabIndex = 7
Top = 840
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "查找"
Height = 375
Left = 5520
TabIndex = 6
Top = 240
Width = 1215
End
Begin VB.Frame Frame1
Height = 2055
Left = 120
TabIndex = 0
Top = 120
Width = 5175
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
ItemData = "frmSearch.frx":0000
Left = 1560
List = "frmSearch.frx":0016
TabIndex = 8
Top = 840
Width = 3375
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 5
Top = 1440
Width = 3375
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
ItemData = "frmSearch.frx":002F
Left = 1560
List = "frmSearch.frx":0054
TabIndex = 4
Top = 240
Width = 3375
End
Begin VB.Label Label4
Caption = "查找条件:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 3
Top = 1440
Width = 1215
End
Begin VB.Label Label3
Caption = "操作符:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 2
Top = 960
Width = 975
End
Begin VB.Label Label2
Caption = "查找项目:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 1
Top = 360
Width = 1215
End
End
End
Attribute VB_Name = "frmSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click() '查找
Dim str As String '查找内容
Dim str As String '查找内容
If Combo1.Text = "" Or Combo2.Text = "" Or Text2.Text = "" Then
MsgBox "查询输入不完整!"
Exit Sub
End If
If Combo2.Text = "=" Then '转换为SQL
str = "like"
Else
str = Combo2.Text
End If
str = Combo1.Text & " " & str & " " & Text2.Text '查询条件
Load frmlist '调用查询窗体
'查找
frmlist.datPrimaryRS.ConnectionString = constr
frmlist.datPrimaryRS.RecordSource = "select 资产编号,资产分类,资产名称,资产型号,购买日期,购买价格,生产单位,使用部门,负责人,使用状况,使用年限,注销日期,注销,备注 from 资产信息表 where " & str & " Order by 资产编号"
frmlist.datPrimaryRS.Refresh
frmlist.Show
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -