📄 form22.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{C3CBD80D-C8D1-11D2-9F8E-0080C7CE5CDC}#4.1#0"; "ACTCNDY2.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Form22
BorderStyle = 1 'Fixed Single
Caption = "查找操作"
ClientHeight = 870
ClientLeft = 45
ClientTop = 495
ClientWidth = 6690
ControlBox = 0 'False
LinkTopic = "Form5"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 870
ScaleWidth = 6690
StartUpPosition = 1 '所有者中心
Begin ActiveCandy.CandySphere command2
Cancel = -1 'True
Default = -1 'True
Height = 480
Left = 6120
TabIndex = 9
Top = 0
Width = 480
_ExtentX = 847
_ExtentY = 847
ContentType = 2
ContentLetter = "取消"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = 255
UseAnimation = 0 'False
UseSound = -1 'True
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "Form22.frx":0000
Height = 330
Left = 600
TabIndex = 1
Top = 100
Width = 975
_ExtentX = 1720
_ExtentY = 582
_Version = 393216
ListField = "编号"
Text = ""
Object.DataMember = "Command1查询"
End
Begin ActiveCandy.CandySphere command1
Height = 480
Left = 5520
TabIndex = 7
Top = 0
Width = 480
_ExtentX = 847
_ExtentY = 847
SphereType = 3
ContentType = 2
ContentIcon = "Form22.frx":0014
ContentLetter = "确定"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = 255
PictureDisabled = "Form22.frx":0466
FocusColor = 0
UseOnTop = 0 'False
UseSound = -1 'True
End
Begin MSComCtl2.DTPicker DTPicker1
Bindings = "Form22.frx":08B8
DataField = "当前时间"
BeginProperty DataFormat
Type = 1
Format = "yyyy-MM-dd"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
DataMember = "Command1查询"
DataSource = "hzzde"
Height = 300
Left = 4200
TabIndex = 5
Top = 120
Width = 1215
_ExtentX = 2143
_ExtentY = 529
_Version = 393216
CalendarTitleBackColor= 16711680
CalendarTitleForeColor= 255
Format = 24576001
CurrentDate = 36734
MaxDate = 36891
MinDate = 36708
End
Begin VB.TextBox Text1
Height = 300
IMEMode = 1 'ON
Left = 2280
TabIndex = 2
Top = 120
Width = 855
End
Begin VB.Label Label5
Caption = "查询条件为:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 0
TabIndex = 8
Top = 600
Width = 1215
End
Begin VB.Label Label4
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1320
TabIndex = 6
Top = 600
Width = 4695
End
Begin VB.Line Line1
BorderColor = &H80000010&
BorderStyle = 6 'Inside Solid
X1 = 7680
X2 = 0
Y1 = 480
Y2 = 480
End
Begin VB.Label Label3
Caption = "输入日期:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3240
TabIndex = 4
Top = 165
Width = 1095
End
Begin VB.Label Label2
Caption = "姓名:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 3
Top = 165
Width = 615
End
Begin VB.Label Label1
Caption = "编号:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 0
TabIndex = 0
Top = 160
Width = 615
End
End
Attribute VB_Name = "Form22"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim bh, xm, rq As String
Dim lbh, lxm, lrq As String
Private Sub command1_Click()
filterstring = Trim(Mid(filterstring, 5))
'Debug.Print filterstring
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
filterstring = ""
lstring = ""
End Sub
Private Sub DataCombo1_Change()
command1.Enabled = True
End Sub
Private Sub DataCombo1_KeyPress(KeyAscii As Integer)
If Len(DataCombo1.Text) < 6 Then ' 当输入小于六个字母时
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 8 Then '除0-9,回撤键外其余的输入无效
KeyAscii = 0 '取消输入
End If
End If
If Len(DataCombo1.Text) = 6 Then '当输入等于六个字母时
If KeyAscii <> 8 Then '回撤键的处理
KeyAscii = 0 '取消输入
End If
End If
End Sub
Private Sub DataCombo1_LostFocus()
'编号
If DataCombo1.Text <> "" Then
lbh = "编号为" & DataCombo1.Text
bh = "编号='" & DataCombo1.Text & "'"
lstring = lstring + lbh + " "
filterstring = filterstring + "and " + bh
Label4.Caption = lstring
End If
End Sub
Private Sub DTPicker1_Change()
command1.Enabled = True
End Sub
Private Sub DTPicker1_LostFocus()
'当前时间
lrq = "日期为 " & DTPicker1.Value
rq = "当前时间=#" & DTPicker1.Value & "# "
lstring = lstring + lrq + " "
filterstring = filterstring + "and " + rq
Label4.Caption = lstring
End Sub
Private Sub Form_Load()
filterstring = ""
lstring = ""
command1.Enabled = False
DTPicker1.Value = Date
End Sub
Private Sub Text1_Change()
command1.Enabled = True
End Sub
Private Sub Text1_LostFocus()
'姓名
If Text1.Text <> "" Then
lxm = "姓名为 " & Text1.Text
xm = "姓名 like '" & Text1.Text & "*'"
lstring = lstring + lxm + " "
filterstring = filterstring + "and " + xm
Label4.Caption = lstring
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -