📄 paperproperty.frm
字号:
TabIndex = 29
Text = "20"
Top = 600
Width = 615
End
Begin VB.TextBox txtAvg
BackColor = &H80000000&
Enabled = 0 'False
Height = 375
Index = 3
Left = 3120
TabIndex = 28
Text = "1"
Top = 1680
Width = 615
End
Begin VB.TextBox txtAvg
BackColor = &H80000000&
Enabled = 0 'False
Height = 375
Index = 2
Left = 3120
TabIndex = 27
Text = "2.5"
Top = 1320
Width = 615
End
Begin VB.TextBox txtAvg
BackColor = &H80000000&
Enabled = 0 'False
Height = 375
Index = 1
Left = 3120
TabIndex = 26
Text = "2"
Top = 960
Width = 615
End
Begin VB.TextBox txtAvg
BackColor = &H80000000&
Enabled = 0 'False
Height = 375
Index = 0
Left = 3120
TabIndex = 25
Text = "1"
Top = 600
Width = 615
End
Begin VB.TextBox txtCount
Height = 375
Index = 3
Left = 2160
TabIndex = 24
Text = "20"
Top = 1680
Width = 615
End
Begin VB.TextBox txtCount
Height = 375
Index = 2
Left = 2160
TabIndex = 23
Text = "20"
Top = 1320
Width = 615
End
Begin VB.TextBox txtCount
Height = 375
Index = 1
Left = 2160
TabIndex = 22
Text = "10"
Top = 960
Width = 615
End
Begin VB.TextBox txtCount
Height = 375
Index = 0
Left = 2160
TabIndex = 21
Text = "10"
Top = 600
Width = 615
End
Begin VB.TextBox txtScore
Height = 375
Index = 3
Left = 1200
TabIndex = 20
Text = "20"
Top = 1680
Width = 615
End
Begin VB.TextBox txtScore
Height = 375
Index = 2
Left = 1200
TabIndex = 19
Text = "50"
Top = 1320
Width = 615
End
Begin VB.TextBox txtScore
Height = 375
Index = 1
Left = 1200
TabIndex = 18
Text = "20"
Top = 960
Width = 615
End
Begin VB.TextBox txtScore
Height = 375
Index = 0
Left = 1200
TabIndex = 17
Text = "10"
Top = 600
Width = 615
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "%"
Height = 255
Left = 6720
TabIndex = 48
Top = 1800
Width = 135
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "%"
Height = 255
Left = 6720
TabIndex = 47
Top = 1440
Width = 135
End
Begin VB.Label Label17
AutoSize = -1 'True
Caption = "%"
Height = 255
Left = 6720
TabIndex = 46
Top = 1080
Width = 135
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "%"
Height = 255
Left = 6720
TabIndex = 45
Top = 720
Width = 135
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "容易"
Height = 255
Left = 6120
TabIndex = 16
Top = 360
Width = 375
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "一般"
Height = 255
Left = 5280
TabIndex = 15
Top = 360
Width = 375
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "难"
Height = 255
Left = 4440
TabIndex = 14
Top = 360
Width = 255
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "分/题"
Height = 255
Left = 3240
TabIndex = 13
Top = 360
Width = 495
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "小题数"
Height = 255
Left = 2160
TabIndex = 12
Top = 360
Width = 615
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "总分"
Height = 255
Left = 1320
TabIndex = 11
Top = 360
Width = 375
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "试卷总分:100分"
Height = 255
Left = 360
TabIndex = 10
Top = 2040
Width = 1455
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "填空题"
Height = 255
Left = 360
TabIndex = 9
Top = 1680
Width = 615
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "多选题"
Height = 255
Left = 360
TabIndex = 8
Top = 1320
Width = 615
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "单选题"
Height = 255
Left = 360
TabIndex = 7
Top = 960
Width = 615
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "判断题"
Height = 255
Left = 360
TabIndex = 6
Top = 600
Width = 615
End
End
End
Attribute VB_Name = "PaperProperty"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim objRsJudge As Recordset, objRsSingle As Recordset, objRsMore As Recordset
Dim objRsSpace As Recordset, objRsChapter As Recordset
Private Sub cmbChapter_Click(Index As Integer)
txtScale(Index) = cmbChapter(Index).ItemData(cmbChapter(Index).ListIndex)
End Sub
Private Sub cmdAnalyse_Click()
On Error GoTo DealError
'分析章节中的题数分配
Dim News, i%, j%, strFilter$, Chapter%(3, 2), k%
News = Array("判断题", "单选题", "多选题", "填空题")
For i = 0 To 3
If Val(txtScore(i)) <> 0 And Val(lblRemain(i)) <> 0 Then
MsgBox News(i) & "试题剩余" & lblRemain(i) & "%未分配", vbCritical
txtScale(i).SetFocus
Exit Sub
End If
Next
'检查章节题量分配是否有效
If objRsChapter.RecordCount <= 0 Then Exit Sub
For i = 0 To 3
If Val(txtScore(i)) <> 0 Then
For j = 0 To cmbChapter(i).ListCount - 1
objRsChapter.MoveFirst
objRsChapter.Find "名称=" & cmbChapter(i).List(j) & ""
strFilter = "章节" & objRsChapter!编号
Select Case i
Case 0 '检查判断题题量分配是否有效
objRsJudge.Filter = strFilter
If objRsJudge.RecordCount < Int(cmbChapter(i).ItemData(j) * txtCount(i) / 100) Then
MsgBox "<" & News(i) & "><" & objRsChapter!名称 & ">中只有<" & objRsJudge.RecordCount _
& ">道试题,小题百分比最多<" & Int(objRsJudge.RecordCount / Val(txtCount(i)) * 100) _
& ">", vbCritical
cmbChapter(i).ListIndex = j
Exit Sub
End If
'小题数通过检验,统计各类难度试题数量
For k = 0 To 2
objRsJudge.Filter = strFilter & "and 难度=" & k
Chapter(i, k) = Chapter(i, k) + objRsJudge.RecordCount
Next
Case 1 '检查单选题题量分配是否有效
objRsSingle.Filter = strFilter
If objRsSingle.RecordCount < Int(cmbChapter(i).ItemData(j) * txtCount(i) / 100) Then
MsgBox "<" & News(i) & "><" & objRsChapter!名称 & ">中只有<" & objRsSingle.RecordCount _
& ">道试题,小题百分比最多<" & Int(objRsSingle.RecordCount / Val(txtCount(i)) * 100) _
& ">", vbCritical
cmbChapter(i).ListIndex = j
Exit Sub
End If
'小题数通过检验,统计各类难度试题数量
For k = 0 To 2
objRsSingle.Filter = strFilter & "and 难度=" & k
Chapter(i, k) = Chapter(i, k) + objRsSingle.RecordCount
Next
Case 2 '检查多选题题量分配是否有效
objRsMore.Filter = strFilter
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -