Private Sub Combo1_LostFocus()
On Error GoTo err
Dim ctl As Control
For Each ctl In Controls
If TypeOf ctl Is TextBox Then
ctl.Text = "0"
End If
Next ctl
If Combo1.ListIndex = -1 Then
Exit Sub
Else
RSCount.Open "select distinct a.考试性质 as ksxz from 成绩表 AS a INNER JOIN 学籍表 AS b ON a.考试号 = b.考试号 Where b.班级 Like " & Combo1.Text, Con, adOpenStatic, , adCmdText
Combo2.Clear
Text1.Text = ""
Combo2.Text = "请选择性质"
Combo2.Enabled = False
If RSCount.EOF = False And RSCount.BOF = False Then
RSCount.MoveFirst
Do While RSCount.EOF = False
Combo2.AddItem RSCount!Ksxz
RSCount.MoveNext
Combo2.Enabled = True
Loop
End If
RSCount.Close
End If
Exit Sub
err:
Call ExecErr(Date, Me.Caption, err.Number, err.Source, err.Description)
End Sub
Private Sub Command1_Click()
On Error GoTo wrong
If Combo1.ListIndex = -1 Or Combo2.ListIndex = -1 Or Text1.Text = "" Then
MsgBox "统计需要项目未完整提供!"
Exit Sub
End If
If Combo3.ListIndex = -1 And (Combo3.Text <> "否" And Combo3.Text <> "是") Then
MsgBox "计外生情况描述不完整!"
Exit Sub
Else
If Combo3.Text = "否" Then