📄 frminputw.frm
字号:
Left = 360
TabIndex = 20
Top = 2930
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "责任者"
Height = 216
Index = 8
Left = 360
TabIndex = 16
Top = 1500
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "形成日期"
Height = 216
Index = 7
Left = 8040
TabIndex = 14
Top = 780
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "文件编号"
Height = 216
Index = 6
Left = 4080
TabIndex = 12
Top = 780
Width = 864
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "档 号"
Height = 216
Index = 5
Left = 360
TabIndex = 10
Top = 780
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "顺序号"
Height = 216
Index = 4
Left = 9240
TabIndex = 8
Top = 300
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "缩微号"
Height = 216
Index = 3
Left = 7080
TabIndex = 6
Top = 300
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "全宗号"
Height = 216
Index = 2
Left = 5160
TabIndex = 4
Top = 300
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "目录号"
Height = 216
Index = 1
Left = 2880
TabIndex = 2
Top = 300
Width = 648
End
Begin VB.Label LabelW
AutoSize = -1 'True
Caption = "分类号"
Height = 216
Index = 0
Left = 360
TabIndex = 0
Top = 300
Width = 648
End
Begin VB.Line Line1
Index = 0
X1 = 120
X2 = 10800
Y1 = 6600
Y2 = 6600
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 1
X1 = 120
X2 = 10800
Y1 = 6612
Y2 = 6612
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 2
X1 = 120
X2 = 10800
Y1 = 1212
Y2 = 1212
End
Begin VB.Line Line1
BorderColor = &H80000003&
Index = 3
X1 = 120
X2 = 10800
Y1 = 1200
Y2 = 1200
End
Begin VB.Line Line1
BorderColor = &H80000005&
Index = 4
X1 = 120
X2 = 10800
Y1 = 3372
Y2 = 3372
End
Begin VB.Line Line1
BorderColor = &H80000003&
Index = 5
X1 = 120
X2 = 10800
Y1 = 3360
Y2 = 3360
End
Begin VB.Line Line2
BorderColor = &H80000005&
Index = 0
X1 = 5544
X2 = 5544
Y1 = 1224
Y2 = 3348
End
Begin VB.Line Line2
BorderColor = &H80000003&
Index = 1
X1 = 5520
X2 = 5520
Y1 = 1224
Y2 = 3348
End
Begin VB.Line Line2
BorderColor = &H80000003&
Index = 2
X1 = 8280
X2 = 8280
Y1 = 1224
Y2 = 3348
End
Begin VB.Line Line2
BorderColor = &H80000005&
Index = 3
X1 = 8304
X2 = 8304
Y1 = 1224
Y2 = 3348
End
Begin VB.Menu File
Caption = "文件(&F)"
Begin VB.Menu F_Add
Caption = "添加档案(&A)"
Shortcut = ^A
End
Begin VB.Menu F_Save
Caption = "保存数据(&V)"
Shortcut = ^O
End
Begin VB.Menu F_Cut
Caption = "-"
End
Begin VB.Menu F_Exit
Caption = "退出(&X)"
Shortcut = ^Q
End
End
Begin VB.Menu Edit
Caption = "编辑(&E)"
Begin VB.Menu E_Copy
Caption = "复制上份内容(&C)"
Shortcut = ^C
End
Begin VB.Menu E_Clear
Caption = "清除当前内容(&L)"
Shortcut = ^L
End
End
Begin VB.Menu Data
Caption = "数据(&D)"
Begin VB.Menu D_Seek
Caption = "查询相关档案(&S)"
Shortcut = ^S
End
Begin VB.Menu D_Modify
Caption = "修改相关档案(&M)"
Shortcut = ^M
End
End
End
Attribute VB_Name = "frmInputW"
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 l_Text(27) As String
Dim ZZID(8) As Integer
Private Function ConfineInput(para_KeyAscii As Integer, para_ConfineStr As String)
Dim sConfineStr As String
sConfineStr = UCase(para_ConfineStr) + Chr(13) + Chr(8) + Chr(27)
If InStr(1, sConfineStr, UCase(Chr(para_KeyAscii)), vbTextCompare) = 0 Then
ConfineInput = 0
Else
ConfineInput = para_KeyAscii
End If
End Function
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 cmdClear_Click()
Call TextEmpty
End Sub
Private Sub cmdCopy_Click()
Dim i As Integer
Text0.Text = l_Text(0)
Text1.Text = l_Text(1)
Text2.Text = l_Text(2)
Text3.Text = l_Text(3)
Text4.Text = l_Text(4)
Text5.Text = l_Text(5)
Text6.Text = l_Text(6)
Text7.Text = l_Text(7)
Text8.Text = l_Text(11)
Text9.Text = l_Text(12)
Text10.Text = l_Text(17)
Text11.Text = l_Text(18)
Text12.Text = l_Text(19)
Text13.Text = l_Text(20)
Text14.Text = l_Text(21)
Text15.Text = l_Text(27)
Combo1.Text = l_Text(13)
Combo2.Text = l_Text(14)
Combo3.Text = l_Text(15)
Combo4.Text = l_Text(16)
For i = 0 To 2
dcZR(i).Text = l_Text(i + 8)
dcZTC(i).Text = l_Text(i + 22)
Next
dcZTC(3).Text = l_Text(25)
dcZTC(4).Text = l_Text(26)
End Sub
Private Sub cmdModify_Click()
Load frmModifyW
frmModifyW.Show
End Sub
Private Sub cmdOK_Click()
With adoRst
.Fields("分类号") = ConvertNull(Text0.Text)
.Fields("目录号") = ConvertNull(Text1.Text)
.Fields("全宗号") = ConvertNull(Text2.Text)
.Fields("缩微号") = ConvertNull(Text3.Text)
.Fields("顺序号") = ConvertNull(Text4.Text)
.Fields("档号") = ConvertNull(Text5.Text)
.Fields("文件编号") = ConvertNull(Text6.Text)
.Fields("形成日期") = ConvertNull(Text7.Text)
.Fields("备注") = ConvertNull(Text8.Text)
.Fields("规格") = ConvertNull(Text9.Text)
.Fields("份数") = ConvertNull(Val(Text10.Text))
.Fields("页号") = ConvertNull(Val(Text11.Text))
.Fields("最后张次") = ConvertNull(Val(Text12.Text))
.Fields("页数") = ConvertNull(Val(Text13.Text))
.Fields("题名") = ConvertNull(Text14.Text)
.Fields("摘要") = ConvertNull(Text15.Text)
.Fields("FileType") = ConvertNull(Text16.Text)
.Fields("保管期限") = ConvertNull(Combo1.Text)
.Fields("文本类别") = ConvertNull(Combo2.Text)
.Fields("密级") = ConvertNull(Combo3.Text)
.Fields("存档情况") = ConvertNull(Combo4.Text)
.Fields("责任者1") = ConvertNull(IIf(dcZR(0).Text = "", -1, ZZID(0)))
.Fields("责任者2") = ConvertNull(IIf(dcZR(1).Text = "", -1, ZZID(1)))
.Fields("责任者3") = ConvertNull(IIf(dcZR(2).Text = "", -1, ZZID(2)))
.Fields("主题词1") = ConvertNull(IIf(dcZTC(0).Text = "", -1, ZZID(3)))
.Fields("主题词2") = ConvertNull(IIf(dcZTC(1).Text = "", -1, ZZID(4)))
.Fields("主题词3") = ConvertNull(IIf(dcZTC(2).Text = "", -1, ZZID(5)))
.Fields("主题词4") = ConvertNull(IIf(dcZTC(3).Text = "", -1, ZZID(6)))
.Fields("主题词5") = ConvertNull(IIf(dcZTC(4).Text = "", -1, ZZID(7)))
Do While False
.Fields("责任者1") = ConvertNull(IIf(dcZR(0).Text = "", -1, dcZR(0).BoundText))
.Fields("责任者2") = ConvertNull(IIf(dcZR(1).Text = "", -1, dcZR(1).BoundText))
.Fields("责任者3") = ConvertNull(IIf(dcZR(2).Text = "", -1, dcZR(2).BoundText))
.Fields("主题词1") = ConvertNull(IIf(dcZTC(0).Text = "", -1, dcZTC(0).BoundText))
.Fields("主题词2") = ConvertNull(IIf(dcZTC(1).Text = "", -1, dcZTC(1).BoundText))
.Fields("主题词3") = ConvertNull(IIf(dcZTC(2).Text = "", -1, dcZTC(2).BoundText))
.Fields("主题词4") = ConvertNull(IIf(dcZTC(3).Text = "", -1, dcZTC(3).BoundText))
.Fields("主题词5") = ConvertNull(IIf(dcZTC(4).Text = "", -1, dcZTC(4).BoundText))
Loop
.Update
End With
Call SaveText
Call TextEmpty
Call SetEnable(False)
cmdAdd.SetFocus
End Sub
Private Sub TextEmpty()
Dim i As Integer
Text0.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
For i = 0 To 2
dcZR(i).Text = ""
dcZTC(i).Text = ""
Next
dcZTC(3).Text = ""
dcZTC(4).Text = ""
End Sub
Private Sub SaveText()
Dim i As Integer
l_Text(0) = Text0.Text
l_Text(1) = Text1.Text
l_Text(2) = Text2.Text
l_Text(3) = Text3.Text
l_Text(4) = Text4.Text
l_Text(5) = Text5.Text
l_Text(6) = Text6.Text
l_Text(7) = Text7.Text
l_Text(11) = Text8.Text
l_Text(12) = Text9.Text
l_Text(13) = Combo1.Text
l_Text(14) = Combo2.Text
l_Text(15) = Combo3.Text
l_Text(16) = Combo4.Text
l_Text(17) = Text10.Text
l_Text(18) = Text11.Text
l_Text(19) = Text12.Text
l_Text(20) = Text13.Text
l_Text(21) = Text14.Text
l_Text(27) = Text15.Text
For i = 0 To 2
l_Text(i + 8) = dcZR(i).Text
l_Text(i + 22) = dcZTC(i).Text
Next
l_Text(25) = dcZTC(3).Text
l_Text(26) = dcZTC(4).Text
End Sub
Private Sub cmdSeek_Click()
Load frmSeekW
frmSeekW.Show
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub Combo2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub Combo3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub Combo4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub D_Modify_Click()
cmdModify_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -