bsp;
If Combo1.ListCount > 0 Then
Combo1.ListIndex = 0
End If
End Sub
Private Sub Command1_Click()
rs.MoveFirst
List1.ListIndex = 1
Display
End Sub
Private Sub Command2_Click()
With rs
.MovePrevious
If .BOF Then
.MoveFirst
Else
List1.ListIndex = List1.ListIndex - 1
End If
End With
Display
End Sub
Private Sub Command3_Click()
With rs
.MoveNext
If rs.EOF Then
rs.MoveLast
Else
List1.ListIndex = List1.ListIndex + 1
End If
End With
Display
End Sub
Private Sub Command4_Click()
rs.MoveLast
List1.ListIndex = List1.ListCount - 1
Display
End Sub
Private Sub List1_Click()
If List1.ListIndex < 1 Then
Else
rs.Move List1.ListIndex - 1, adBookmarkFirst
End If
Display
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
End If
End Sub
Private Sub txtcj_GotFocus(Index As Integer)
For i = 0 To 8
If txtcj(i).Text = "0" Then
txtcj(i).Text = ""
End If
Next i
SBar1.Panels.Item(1) = "处于更改成绩状态!"
End Sub
Private Sub txtcj_KeyPress(Index As Integer, KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) Then
KeyAscii = 0
End If
End Sub
Private Sub Pass()
If Text1.Text = "" Then
Text1.Text = Date
End If
If Text2.Text = "" Then
Text2.Text = "1.0"
End If
If Combo1.ListIndex = -1 Then
Combo1.Text = "101"
End If
If Trim(Text3.Text) = "" Then
Text3.Text = "130"
End If
For i = 0 To 8
If Check1(i).Value = 1 Then
txtcj(i).Enabled = False
txtcj(i).Text = "0"
End If
Next i
End Sub
Private Sub Display()
If rs.EOF Then
rs.MoveLast
MsgBox "记录已到最后一条!"
End If
List1.ListIndex = List1.ListIndex
KSH.Caption = "" & rs!考试号
Xh.Caption = "" & rs!学号
XM.Caption = "" & rs!姓名
Rs1.Open "select a.考试号 as 考试号 ,a.学号 as 学号,a.姓名 as 姓名,b.语文 as 语文,b.数学 as 数学,b.英语 as 英语,b.物理 as 物理,b.化学 as 化学,b.政治 as 政治,b.历史 as 历史,b.地理 as 地理,b.生物 as 生物,b.总分 as 总分 from 学籍表 as a Left outer JOIN 成绩表 as b on a.考试号=b.考试号 where a.考试号='" & Trim(KSH.Caption) & "' and b.考试性质='" & Trim(Text1.Text) & "' order by a.学号", Con, adOpenStatic, adLockPessimistic, adCmdText
If Rs1.EOF = False And Rs1.BOF = False Then
AddFlg = False
txtcj(0).Text = "" & Rs1!语文
txtcj(1).Text = "" & Rs1!数学
txtcj(2).Text = "" & Rs1!英语
txtcj(3).Text = "" & Rs1!物理
txtcj(4).Text = "" & Rs1!化学
txtcj(5).Text = "" & Rs1!政治
txtcj(6).Text = "" & Rs1!历史
txtcj(7).Text = "" & Rs1!地理
txtcj(8).Text = "" & Rs1!生物
txtcj(9).Text = "" & Rs1!总分
Else
AddFlg = True
For i = 0 To 9
txtcj(i).Text = "0"
Next i
End If
Rs1.Close
End Sub
Private Sub txtcj_LostFocus(Index As Integer)
For i = 0 To 8
If txtcj(i).Text = "" Then
txtcj(i).Text = "0"
End If
Ne