📄 form_query.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form form_Query
BorderStyle = 1 'Fixed Single
ClientHeight = 5250
ClientLeft = 45
ClientTop = 330
ClientWidth = 6705
KeyPreview = -1 'True
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "form_Query.frx":0000
ScaleHeight = 5250
ScaleWidth = 6705
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Height = 285
Left = 2385
Picture = "form_Query.frx":2209F
Style = 1 'Graphical
TabIndex = 27
Top = 4815
Width = 1455
End
Begin VB.CommandButton Command8
Height = 285
Left = 3945
Picture = "form_Query.frx":221D2
Style = 1 'Graphical
TabIndex = 26
Top = 4815
Width = 1410
End
Begin VB.TextBox Text8
Height = 285
Left = 4050
TabIndex = 25
Top = 4365
Width = 960
End
Begin VB.TextBox Text7
Height = 360
Left = 3510
MaxLength = 4
TabIndex = 22
Text = "Text7"
Top = 3900
Width = 975
End
Begin VB.ComboBox Combo1
Height = 300
Left = 2250
Style = 2 'Dropdown List
TabIndex = 21
Top = 4365
Width = 1140
End
Begin VB.TextBox Text6
Height = 330
Left = 2250
MaxLength = 4
TabIndex = 20
Text = "Text6"
Top = 3915
Width = 915
End
Begin VB.CommandButton Command6
Height = 315
Left = 3420
Picture = "form_Query.frx":22305
Style = 1 'Graphical
TabIndex = 17
Top = 5625
Width = 1470
End
Begin VB.CommandButton Command7
Height = 315
Left = 1755
Picture = "form_Query.frx":22438
Style = 1 'Graphical
TabIndex = 16
Top = 5625
Width = 1455
End
Begin VB.TextBox Text4
Height = 345
Left = 2250
TabIndex = 15
Text = "Text4"
Top = 3480
Visible = 0 'False
Width = 2145
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 345
Left = 2250
TabIndex = 11
Top = 3000
Width = 1305
_ExtentX = 2302
_ExtentY = 609
_Version = 393216
Format = 57933827
CurrentDate = -109205
End
Begin VB.TextBox Text5
Height = 345
Left = 2250
TabIndex = 8
Text = "Text5"
Top = 840
Width = 2145
End
Begin VB.CommandButton Command1
Default = -1 'True
Height = 300
Left = 1305
Picture = "form_Query.frx":2256B
Style = 1 'Graphical
TabIndex = 6
Top = 4815
Width = 1005
End
Begin VB.TextBox Text3
Height = 345
Left = 2250
TabIndex = 5
Text = "Text3"
Top = 2490
Width = 2145
End
Begin VB.TextBox Text2
Height = 345
Left = 2250
TabIndex = 4
Text = "Text2"
Top = 1940
Width = 2145
End
Begin VB.TextBox Text1
Height = 345
Left = 2250
TabIndex = 3
Text = "Text1"
Top = 1390
Width = 2145
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 345
Left = 3750
TabIndex = 12
Top = 3000
Width = 1275
_ExtentX = 2249
_ExtentY = 609
_Version = 393216
Format = 57933827
CurrentDate = 38141
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "盒号"
ForeColor = &H00000000&
Height = 180
Left = 3555
TabIndex = 24
Top = 4410
Width = 360
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "~"
Height = 180
Left = 3240
TabIndex = 23
Top = 3990
Width = 180
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "保管期限"
ForeColor = &H00000000&
Height = 195
Left = 1170
TabIndex = 19
Top = 4410
Width = 840
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "年 度"
ForeColor = &H00000000&
Height = 195
Left = 1215
TabIndex = 18
Top = 4005
Width = 465
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文件编号"
Height = 195
Left = 1215
TabIndex = 14
Top = 3540
Visible = 0 'False
Width = 840
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "~"
Height = 180
Left = 3540
TabIndex = 13
Top = 3030
Width = 180
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "日 期"
Height = 195
Left = 1215
TabIndex = 10
Top = 3030
Width = 465
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "室编档号"
Height = 195
Left = 1215
TabIndex = 9
Top = 930
Width = 840
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1620
TabIndex = 7
Top = 180
Width = 180
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "主题词"
Height = 195
Left = 1215
TabIndex = 2
Top = 2520
Width = 630
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "责任者"
Height = 195
Left = 1215
TabIndex = 1
Top = 2025
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文件题名"
Height = 195
Left = 1215
TabIndex = 0
Top = 1515
Width = 840
End
End
Attribute VB_Name = "form_Query"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim JG As String '进馆标准 ---y进馆 n---不进馆
Private Sub Command1_Click()
On Error GoTo ex:
'MsgBox flagDate
If Text6.text <> "" Then
If Len(Text6.text) <> 4 Then
MsgBox "归档年份请输入4位!", 48, ""
Exit Sub
End If
End If '归档年分位数判断,可以为空
If Text7.text <> "" Then
If Len(Text7.text) <> 4 Then
MsgBox "归档年份请输入4位!", 48, ""
Exit Sub
End If
End If '归档年分位数判断,可以为空
If Not (Text6.text <> "" Or Text7.text <> "") Then
If Text7.text < Text6.text Then
MsgBox "起始年份不应大于终止年份!", 48, ""
Exit Sub
End If
End If
If Me.DTPicker2.Value < Me.DTPicker1.Value Then
MsgBox "终止日期不应小于起始日期!", 48, ""
Exit Sub
End If
If query = "file" Then
strSql = "select * from T_ARCHIVE_FILE_VOLUME where 1=1 "
If Text1.text <> "" Then
strSql = strSql + " and TITLE_PROPER like '%" & Text1.text & "%'"
End If
If Text2.text <> "" Then
strSql = strSql + " and PRIMARY_CREATOR like '%" & Text2.text & "%'"
End If
If Text3.text <> "" Then
strSql = strSql + " and DISCRIPTOR like '%" & Text3.text & "%'"
End If
If Text4.text <> "" Then
strSql = strSql + " and document_code like '%" & Text4.text & "%'"
End If
If Text5.text <> "" Then
strSql = strSql + " and REFERENCE_CODE_OF_FILE_OFFICE like '%" & Text5.text & "%'"
End If
If Text6.text <> "" Then
strSql = strSql + " and archive_year >= '" & Text6.text & "'"
End If
If Text7.text <> "" Then
strSql = strSql + " and archive_year <= '" & Text7.text & "'"
End If
If Text8.text <> "" Then
strSql = strSql + " and inboxcode= '" & Text8.text & "'"
End If
If Combo1.text <> "" Then
strSql = strSql + " and RETENTION_PERIOD='" & Combo1.ListIndex - 1 & "'"
End If
If flagDate = "1" Then
strSql = strSql + " and date_begun>='" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and date_begun<='" & Format(DTPicker2.Value, "yyyy-mm-dd") & "'"
End If
If JG = "n" Then
strSql = strSql + "and file_number=0 order by archive_year,RETENTION_PERIOD,REFERENCE_CODE_OF_FILE_OFFICE"
ElseIf JG = "y" Then
strSql = strSql + "and file_number=0 order by boxcode"
Else
strSql = strSql + "and file_number=0 order by archive_year,RETENTION_PERIOD,REFERENCE_CODE_OF_FILE_OFFICE"
End If
flagWhereF = strSql
form_WenJian.ListView2.ListItems.Clear
rs.Open strSql, conn
Dim itmX As ListItem
While Not rs.EOF
i = i + 1
'Set itmX = form_WenJian.ListView2.ListItems.Add(, , xml("number_of_page"))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -