📄 frmtj.frm
字号:
VERSION 5.00
Begin VB.Form Frmtj
Caption = "考卷评分"
ClientHeight = 5940
ClientLeft = 60
ClientTop = 345
ClientWidth = 7035
LinkTopic = "Form4"
ScaleHeight = 5940
ScaleWidth = 7035
StartUpPosition = 3 '窗口缺省
Begin VB.ListBox LstFill
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3630
Left = 3600
TabIndex = 4
Top = 240
Width = 3135
End
Begin VB.ListBox LstSele
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3630
Left = 240
TabIndex = 1
Top = 240
Width = 3135
End
Begin VB.CommandButton Cmdml
Caption = "结束考试"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 3000
TabIndex = 0
Top = 5280
Width = 1000
End
Begin VB.Label Lblsm
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 495
Left = 360
TabIndex = 5
Top = 4560
Width = 6495
End
Begin VB.Label Label2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 3720
TabIndex = 3
Top = 3960
Width = 3255
End
Begin VB.Label Label1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 2
Top = 3960
Width = 2895
End
End
Attribute VB_Name = "Frmtj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim senum As Integer '答对的选择题数
Dim finum As Integer '答对的填空题数
Private Sub cmdml_Click()
Dim i As Integer
Dim da As String
Unload Frmxz
'-----------------------------------------------------------------------
' 将考生成绩记录在考生UserDb库中
'-----------------------------------------------------------------------
rsuser.Fields("user_flag").Value = True
rsuser.Fields("user_sscore").Value = senum
rsuser.Fields("user_fscore").Value = finum
rsuser.Update
'-----------------------------------------------------------------------
' 释放Recordset对象
'-----------------------------------------------------------------------
rssele.Close
Set rssele = Nothing
rsuser.Close
Set rsuser = Nothing
End
End Sub
Private Sub Form_Load()
Dim i As Integer
Dim Entry As String
'-----------------------------------------------------------------------
' 从头到尾浏览考生选择题库,判别正确与否,并删除考生答案
'-----------------------------------------------------------------------
rssele.MoveFirst
i = 1
While Not rssele.EOF
If rssele.Fields("se_da").Value = Trim(rssele.Fields("se_ksda").Value) Then
Entry = "第" & Format(i, "00") & "题 √"
senum = senum + 1
Else
Entry = "第" & Format(i, "00") & "题 错误"
End If
rssele.Edit
rssele.Fields("se_ksda").Value = " "
rssele.Update
LstSele.AddItem Entry
rssele.MoveNext
i = i + 1
Wend
'-----------------------------------------------------------------------
' 从头到尾浏览考生填空题库,判别正确与否,并删除考生答案
'-----------------------------------------------------------------------
Frmxz.fillData.Recordset.MoveFirst
i = 1
While Not Frmxz.fillData.Recordset.EOF
If UCase(Frmxz.fillData.Recordset!fill_da) Like _
UCase(Trim(Frmxz.fillData.Recordset!fill_ksda)) Then
Entry = "第" & Format(i, "00") & "题 √"
finum = finum + 1
Else
Entry = "第" & Format(i, "00") & "题 错误"
End If
Frmxz.fillData.Recordset.Edit
Frmxz.fillData.Recordset!fill_ksda = " "
Frmxz.fillData.Recordset.Update
LstFill.AddItem Entry
Frmxz.fillData.Recordset.MoveNext
i = i + 1
Wend
CenterOnSetupForm Me
'-----------------------------------------------------------------------
' 显示考生得分
'-----------------------------------------------------------------------
Label1.Caption = "选择题得分:" & Str(senum) & "题"
Label2.Caption = "填空题得分:" & Str(finum) & "题"
Lblsm.Caption = "该考生已结束考试,不得重考!"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -