Private Sub TxtFsd_KeyPress(Index As Integer, KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
End If
End Sub
Private Sub ExecPass()
For i = 0 To 7
If TxtFsd(i).Text = "" Then
MsgBox "分数段数值错误!此次统计不实。", , "错误项" & i & ":"
Exit Sub
End If
Next i
If CInt(TxtFsd(0).Text) > CInt(TxtFsd(1).Text) And CInt(TxtFsd(1).Text) > CInt(TxtFsd(2).Text) And CInt(TxtFsd(2).Text) > CInt(TxtFsd(3).Text) And CInt(TxtFsd(3).Text) > CInt(TxtFsd(4).Text) And CInt(TxtFsd(4).Text) > CInt(TxtFsd(5).Text) And CInt(TxtFsd(5).Text) > CInt(TxtFsd(6).Text) And CInt(TxtFsd(6).Text) > CInt(TxtFsd(7).Text) Then
Else
MsgBox "请保持数值递减顺序!此次统计不实。", , "数值错误:"
Exit Sub
End If
End Sub
Private Sub LoadData()
Dim Query As String
Dim PicRs As ADODB.Recordset
Set PicRs = New ADODB.Recordset
Query = "select b.姓名 as xm , a." & Combo2.Text & " as Cj from 成绩表 AS a INNER JOIN 学籍表 AS b ON a.考试号 = b.考试号 where 班级 = '" & Combo1.Text & "' and 考试性质 = '" & Combo3.Text & "'"
PicRs.Open Query, Con, adOpenStatic, , adCmdText
With PicRs
Do While Not .EOF
If CInt(PicRs!cj) >= CInt(TxtFsd(0).Text) Then
Icj(0) = Icj(0) + 1
ComLst(0).AddItem PicRs!XM
End If
If CInt(PicRs!cj) >= CInt(TxtFsd(1).Text) And CInt(PicRs!cj) < CInt(TxtFsd(0).Text) Then
Icj(1) = Icj(1) + 1
ComLst(1).AddItem PicRs!XM
End If
If CInt(PicRs!cj) >= CInt(TxtFsd(2).Text) And CInt(PicRs!cj) < CInt(TxtFsd(1).Text) Then
Icj(2) = Icj(2) + 1
ComLst(2).AddItem PicRs!XM
End If
&