📄 frmseekw.frm
字号:
AutoSize = -1 'True
Caption = "形成日期"
Height = 216
Index = 7
Left = 9480
TabIndex = 15
Top = 900
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "文件编号"
Height = 216
Index = 6
Left = 6000
TabIndex = 13
Top = 900
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "档 号"
Height = 216
Index = 5
Left = 2760
TabIndex = 11
Top = 900
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "顺序号"
Height = 216
Index = 4
Left = 10320
TabIndex = 9
Top = 420
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "缩微号"
Height = 216
Index = 3
Left = 8400
TabIndex = 7
Top = 420
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "全宗号"
Height = 216
Index = 2
Left = 6840
TabIndex = 5
Top = 420
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "目录号"
Height = 216
Index = 1
Left = 4920
TabIndex = 3
Top = 420
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "分类号"
Height = 216
Index = 0
Left = 2760
TabIndex = 1
Top = 420
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "最后张次"
Height = 216
Index = 17
Left = 9960
TabIndex = 37
Top = 2580
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "页号"
Height = 216
Index = 16
Left = 10320
TabIndex = 35
Top = 2100
Width = 432
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "页数"
Height = 216
Index = 18
Left = 10320
TabIndex = 39
Top = 3036
Width = 432
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "份数"
Height = 216
Index = 15
Left = 10320
TabIndex = 33
Top = 1596
Width = 432
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "文本类别"
Height = 216
Index = 12
Left = 7800
TabIndex = 27
Top = 2100
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "存档情况"
Height = 216
Index = 14
Left = 7800
TabIndex = 31
Top = 3060
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "文件密级"
Height = 216
Index = 13
Left = 7800
TabIndex = 29
Top = 2580
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "保管期限"
Height = 216
Index = 11
Left = 7800
TabIndex = 25
Top = 1620
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "规格"
Height = 216
Index = 10
Left = 6000
TabIndex = 23
Top = 3048
Width = 432
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "备 注"
Height = 216
Index = 9
Left = 2760
TabIndex = 21
Top = 3048
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "责任者"
Height = 216
Index = 8
Left = 2760
TabIndex = 17
Top = 1620
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "摘 要"
Height = 216
Index = 21
Left = 2760
TabIndex = 49
Top = 5880
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "主题词"
Height = 216
Index = 20
Left = 2760
TabIndex = 43
Top = 4752
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "题 名"
Height = 216
Index = 19
Left = 2760
TabIndex = 41
Top = 3720
Width = 648
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 2
X1 = 2640
X2 = 11800
Y1 = 1332
Y2 = 1332
End
Begin VB.Line Line1
BorderColor = &H80000003&
Index = 3
X1 = 2640
X2 = 11800
Y1 = 1320
Y2 = 1320
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 0
X1 = 2640
X2 = 11800
Y1 = 3492
Y2 = 3492
End
Begin VB.Line Line1
BorderColor = &H80000003&
Index = 1
X1 = 2640
X2 = 11800
Y1 = 3480
Y2 = 3480
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 4
X1 = 2640
X2 = 11800
Y1 = 5652
Y2 = 5652
End
Begin VB.Line Line1
BorderColor = &H80000003&
Index = 5
X1 = 2640
X2 = 11800
Y1 = 5640
Y2 = 5640
End
Begin VB.Line Line2
BorderColor = &H80000005&
Index = 0
X1 = 7500
X2 = 7500
Y1 = 1344
Y2 = 3468
End
Begin VB.Line Line2
BorderColor = &H80000003&
Index = 1
X1 = 7476
X2 = 7476
Y1 = 1344
Y2 = 3468
End
Begin VB.Line Line2
BorderColor = &H80000005&
Index = 2
X1 = 9828
X2 = 9828
Y1 = 1344
Y2 = 3468
End
Begin VB.Line Line2
BorderColor = &H80000003&
Index = 3
X1 = 9804
X2 = 9804
Y1 = 1344
Y2 = 3468
End
End
Attribute VB_Name = "frmSeekW"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim adoCon As ADODB.Connection
Dim adoRst, adoZrRst, adoZtcRst As ADODB.Recordset
Dim ThisItem, LastItem As Integer
Private Function ConvertNull(para_Value As Variant) As Variant
If IsNull(para_Value) = True Then
ConvertNull = ""
Else
ConvertNull = para_Value
End If
End Function
Private Sub cmdRefilt_Click()
adoRst.CancelUpdate
adoRst.Close
frmSeekW.Hide
Unload frmSeekW
Load frmFilterW
frmFilterW.Show
End Sub
Private Sub CmdReturn_Click()
adoRst.CancelUpdate
adoRst.Close
frmSeekW.Hide
Unload frmSeekW
End Sub
Private Sub Form_Load()
Set adoCon = New ADODB.Connection
adoCon.Open "PmData", "Admin"
Set adoRst = New ADODB.Recordset
Set adoRst.ActiveConnection = adoCon
adoRst.CursorType = adOpenDynamic
adoRst.LockType = adLockOptimistic
Set adoZrRst = New ADODB.Recordset
Set adoZrRst.ActiveConnection = adoCon
adoZrRst.CursorType = adOpenDynamic
adoZrRst.LockType = adLockOptimistic
Set adoZtcRst = New ADODB.Recordset
Set adoZtcRst.ActiveConnection = adoCon
adoZtcRst.CursorType = adOpenDynamic
adoZtcRst.LockType = adLockOptimistic
Dim sSQL As String
sSQL = "Select * From DataW Where FileType Like '" & frmMain.FileType & _
"' " & frmFtype.FilterText & " Order By 档号,页号"
adoRst.Open sSQL
adoZrRst.Open "Select * From Zr"
adoZtcRst.Open "Select * From ZTC"
Call ListDH '调用档号列表
End Sub
Private Sub ListRecord()
Dim Zr, Ztc As Integer
With adoRst
Text0.Text = ConvertNull(.Fields!分类号)
Text1.Text = ConvertNull(.Fields!目录号)
Text2.Text = ConvertNull(.Fields!全宗号)
Text3.Text = ConvertNull(.Fields!缩微号)
Text4.Text = ConvertNull(.Fields!顺序号)
Text5.Text = ConvertNull(.Fields!档号)
Text6.Text = ConvertNull(.Fields!文件编号)
Text7.Text = ConvertNull(.Fields!形成日期)
Text11.Text = ConvertNull(.Fields!备注)
Text12.Text = ConvertNull(LTrim(.Fields!规格))
Text13.Text = ConvertNull(.Fields!保管期限)
Text14.Text = ConvertNull(.Fields!文本类别)
Text15.Text = ConvertNull(.Fields!密级)
Text16.Text = ConvertNull(.Fields!存档情况)
Text17.Text = ConvertNull(.Fields!份数)
Text18.Text = ConvertNull(.Fields!页号)
Text19.Text = ConvertNull(.Fields!最后张次)
Text20.Text = ConvertNull(.Fields!页数)
Text21.Text = ConvertNull(.Fields!题名)
Text27.Text = ConvertNull(.Fields!摘要)
End With
With adoZrRst
Zr = adoRst.Fields!责任者1
.MoveFirst
.Find "ZrID=" & Zr
If .EOF Or .BOF Then
Text8.Text = ""
Else
Text8.Text = .Fields!Zr
End If
Zr = adoRst.Fields!责任者2
.MoveFirst
.Find "ZrID=" & Zr
If .EOF Or .BOF Then
Text9.Text = ""
Else
Text9.Text = .Fields!Zr
End If
Zr = adoRst.Fields!责任者3
.MoveFirst
.Find "ZrID=" & Zr
If .EOF Or .BOF Then
Text10.Text = ""
Else
Text10.Text = .Fields!Zr
End If
End With
With adoZtcRst
Ztc = adoRst.Fields!主题词1
.MoveFirst
.Find "ZtcID=" & Ztc
If .EOF Or .BOF Then
Text22.Text = ""
Else
Text22.Text = .Fields!Ztc
End If
Ztc = adoRst.Fields!主题词2
.MoveFirst
.Find "ZtcID=" & Ztc
If .EOF Or .BOF Then
Text23.Text = ""
Else
Text23.Text = .Fields!Ztc
End If
Ztc = adoRst.Fields!主题词3
.MoveFirst
.Find "ZtcID=" & Ztc
If .EOF Or .BOF Then
Text24.Text = ""
Else
Text24.Text = .Fields!Ztc
End If
Ztc = adoRst.Fields!主题词4
.MoveFirst
.Find "ZtcID=" & Ztc
If .EOF Or .BOF Then
Text25.Text = ""
Else
Text25.Text = .Fields!Ztc
End If
Ztc = adoRst.Fields!主题词5
.MoveFirst
.Find "ZtcID=" & Ztc
If .EOF Or .BOF Then
Text26.Text = ""
Else
Text26.Text = .Fields!Ztc
End If
End With
End Sub
Private Sub ListDH() '档号列表
Dim dh_num As Integer
dh_num = 0
With adoRst
Do Until .EOF
ListDW.AddItem adoRst!档号
dh_num = dh_num + 1
.MoveNext
Loop
If dh_num = 0 Then
MsgBox "此档案不存在!"
Else
.MoveFirst
ListDW.Text = ListDW.List(0)
LastItem = ListDW.ListIndex
ThisItem = LastItem
End If
End With
End Sub
Private Sub ListDW_Click()
Dim SkipNum, i As Integer
ThisItem = ListDW.ListIndex
SkipNum = ThisItem - LastItem
If SkipNum <> 0 Then adoRst.Move SkipNum
LastItem = ThisItem
Call ListRecord
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -