📄 form_queryv.frm
字号:
VERSION 5.00
Begin VB.Form form_QueryV
BorderStyle = 1 'Fixed Single
ClientHeight = 3795
ClientLeft = 45
ClientTop = 330
ClientWidth = 5865
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
Picture = "form_QueryV.frx":0000
ScaleHeight = 3795
ScaleWidth = 5865
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command2
Height = 315
Left = 3600
Picture = "form_QueryV.frx":2209F
Style = 1 'Graphical
TabIndex = 19
Top = 3210
Width = 1425
End
Begin VB.CommandButton Command12
Height = 315
Left = 2010
Picture = "form_QueryV.frx":221D2
Style = 1 'Graphical
TabIndex = 18
Top = 3210
Width = 1425
End
Begin VB.ComboBox Combo3
Height = 300
Left = 2040
Style = 2 'Dropdown List
TabIndex = 17
Top = 2730
Visible = 0 'False
Width = 1215
End
Begin VB.TextBox Text5
Height = 345
Left = 2040
TabIndex = 15
Text = "Text5"
Top = 660
Width = 2145
End
Begin VB.TextBox Text4
Height = 345
Left = 3300
MaxLength = 4
TabIndex = 7
Text = "Text4"
Top = 1890
Width = 1005
End
Begin VB.TextBox Text2
Height = 345
Left = 2040
MaxLength = 4
TabIndex = 6
Text = "Text2"
Top = 1920
Width = 975
End
Begin VB.ComboBox Combo2
Height = 300
Left = 2040
Style = 2 'Dropdown List
TabIndex = 5
Top = 2340
Width = 1035
End
Begin VB.ComboBox Combo1
Height = 300
Left = 3570
Style = 2 'Dropdown List
TabIndex = 4
Top = 2340
Width = 1035
End
Begin VB.TextBox Text1
Height = 345
Left = 2040
TabIndex = 2
Text = "Text1"
Top = 1080
Width = 2145
End
Begin VB.TextBox Text3
Height = 345
Left = 2040
TabIndex = 1
Text = "Text3"
Top = 1500
Width = 2145
End
Begin VB.CommandButton Command1
Default = -1 'True
Height = 315
Left = 870
Picture = "form_QueryV.frx":22305
Style = 1 'Graphical
TabIndex = 0
Top = 3210
Width = 1005
End
Begin VB.Label JG
BackStyle = 0 'Transparent
Caption = "进馆标志"
Height = 225
Left = 3660
TabIndex = 20
Top = 2790
Visible = 0 'False
Width = 915
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "信息类型"
Height = 180
Left = 1050
TabIndex = 16
Top = 2790
Visible = 0 'False
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "室编档号"
Height = 180
Left = 1050
TabIndex = 14
Top = 750
Width = 720
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 = 1470
TabIndex = 13
Top = 150
Width = 180
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "主题词"
Height = 180
Left = 1050
TabIndex = 12
Top = 1590
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "案卷题名"
Height = 180
Left = 1050
TabIndex = 11
Top = 1170
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "归档年份"
Height = 180
Left = 1050
TabIndex = 10
Top = 1980
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "保管期限"
Height = 180
Left = 1050
TabIndex = 9
Top = 2400
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密级"
Height = 180
Left = 3150
TabIndex = 8
Top = 2400
Width = 360
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "到"
Height = 255
Left = 3060
TabIndex = 3
Top = 1980
Width = 315
End
End
Attribute VB_Name = "form_QueryV"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strSql As String
Private Sub Command1_Click()
On Error GoTo e:
If Text2.text <> "" Then
If Len(Text2.text) <> 4 Then
MsgBox "归档年份请输入4位!", 48, ""
Exit Sub
End If
End If '归档年分位数判断,可以为空
If Text4.text <> "" Then
If Len(Text4.text) <> 4 Then
MsgBox "归档年份请输入4位!", 48, ""
Exit Sub
End If
End If '归档年分位数判断,可以为空
If Not (Text4.text <> "" Or Text2.text <> "") Then
If Text4.text < Text2.text Then
MsgBox "起始年份不应大于终止年份!", 48, ""
Exit Sub
End If
End If
Dim itmX As ListItem
Dim tCommon As String
Select Case form_AnJuan.List1.ListIndex
Case 0
'MsgBox "文书档案" '0
tCommon = "T_ARCHIVE_0100_volume"
Case 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26
'MsgBox "专业档案" '1
tCommon = "T_ARCHIVE_0200_volume"
Case 10
'会计档案
tCommon = "T_ARCHIVE_0203_volume"
Case 11
'实物档案
tCommon = "T_ARCHIVE_0204_volume"
Case 12
'人物档案
tCommon = "T_ARCHIVE_0500_volume"
Case 13
'电子档案
tCommon = "T_ARCHIVE_0400_volume"
Case 7
'MsgBox "---照片档案" '2
tCommon = "T_ARCHIVE_0202_volume"
Case 8, 9
'MsgBox "---音、视频档案" '3
tCommon = "T_ARCHIVE_0201_volume"
Case 2, 3, 4, 5
'MsgBox "科技档案" '19
tCommon = "T_ARCHIVE_0300_volume"
Case Else
'MsgBox "请选择小类档案", vbInformation, ""
Exit Sub
End Select
strSql = "select * from " + tCommon + " where 1=1 "
If Text1.text <> "" Then
strSql = strSql + " and TITLE_PROPER like '%" & Text1.text & "%'"
End If
If Text3.text <> "" Then
strSql = strSql + " and DISCRIPTOR like '%" & Text3.text & "%'"
End If
If Text2.text <> "" Then
strSql = strSql + " and ARCHIVE_YEAR>='" & Text2.text & "'"
End If
If Text4.text <> "" Then
strSql = strSql + " and archive_year<='" & Text4.text & "'"
End If
If Text5.text <> "" Then
strSql = strSql + " and REFERENCE_CODE_OF_FILE_OFFICE like'%" & Text5.text & "%'"
End If
If Combo1.text <> "" Then
strSql = strSql + " and SECRET_LEVEL_FOR_DOCUMENTS='" & Combo1.ListIndex - 1 & "'"
End If
If Combo2.text <> "" Then '电子 会计档案列表不同
If Not (form_AnJuan.List1.ListIndex = 13 Or form_AnJuan.List1.ListIndex = 10) Then
strSql = strSql + " and RETENTION_PERIOD='" & Combo2.ListIndex - 1 & "'"
Else
strSql = strSql + " and RETENTION_PERIOD='" & Combo2.text & "'"
End If
End If
Select Case form_AnJuan.List1.ListIndex
Case 0
'MsgBox "文书档案" '0
strSql = strSql + ""
Case 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26
'MsgBox "专业档案" '1
strSql = strSql + " and class_code='" & form_AnJuan.List1.ListIndex & "'"
Case 7
'MsgBox "---照片档案" '2
strSql = strSql + " and class_code='" & form_AnJuan.List1.ListIndex & "'"
Case 8, 9
'MsgBox "---音、视频档案" '3
strSql = strSql + " and class_code='" & form_AnJuan.List1.ListIndex & "'"
Case 2, 3, 4, 5
'MsgBox "科技档案" '19
strSql = strSql + " and class_code='" & form_AnJuan.List1.ListIndex & "'"
Case 10, 12
Case 11 '实物档案
If Combo3.text <> "" Then
strSql = strSql + " and ACCOUNT_BOOK_TYPE='" & Combo3.text & "'"
End If
Case 13
'电子
If Combo3.text <> "" Then
strSql = strSql + " and medium_type='" & Combo3.text & "'"
End If
Case Else
MsgBox "请选择小类档案", vbInformation, ""
Exit Sub
End Select
If JG = "n" Then
strSql = strSql + " order by REFERENCE_CODE_OF_FILE_OFFICE,file_number "
ElseIf JG = "y" Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -