当前位置:首页 > 学生信息管理系统
End With End If
Combo2(1).Clear Combo2(2).Clear Text2(2) = \End Sub
Private Sub Command5_Click() Dim j As Integer
Dim txtSQL As String If Text3(0) = \
MsgBox \清选择要修改的纪录!\提示\ MSFlexGrid1.SetFocus Exit Sub End If
If Text3(1) = \
MsgBox \考试期号不能为空!\提示\ Text3(1).SetFocus Exit Sub End If
If Combo3(0).Text = \
MsgBox \学生班号不能为空!\提示\ Combo3(0).SetFocus Exit Sub End If
If Combo3(1).Text = \
MsgBox \学生编号不能为空!\提示\ Combo3(1).SetFocus Exit Sub End If
If Combo3(2).Text = \
MsgBox \考试课程不能为空!\提示\ Combo3(2).SetFocus Exit Sub End If
If Text3(2) = \
MsgBox \考试分数不能为空!\提示\ Text3(2).SetFocus Exit Sub End If
txtSQL = \* from score_Form where score_NO<>'\& Trim(Text3(0)) & \And score_Per='\& Trim(Text3(1)) & \and score_Cla='\& Trim(Combo3(0).Text) & \and score_Stu='\ Set mrc = ExecuteSQL(txtSQL, MsgText) If mrc.EOF = False Then
MsgBox \同次同人同科只能添加一次\警告\ Text3(2) = \
Combo3(0).SetFocus Exit Sub End If
txtSQL = \ Set mrc = ExecuteSQL(txtSQL, MsgText) txtSQL = \ Set mrc = ExecuteSQL(txtSQL, MsgText) mrc.AddNew
mrc.Fields(0) = Trim(Text3(0)) mrc.Fields(1) = Trim(Text3(1))
mrc.Fields(2) = Trim(Combo3(0).Text)
mrc.Fields(3) = Trim(Combo3(1).Text) mrc.Fields(4) = Trim(Combo3(2).Text) mrc.Fields(5) = Trim(Text3(2)) mrc.Update mrc.Close
MsgBox \考试信息修改成功!\提示\ j = 0
For i = 1 To MSFlexGrid1.Rows - 1
If MSFlexGrid1.TextMatrix(i, 0) = Text3(0) Then j = i End If Next
If j <> 0 Then
With MSFlexGrid1
.TextMatrix(j, 0) = Trim(Text3(0)) .TextMatrix(j, 1) = Trim(Text3(1))
.TextMatrix(j, 2) = Trim(Combo3(0).Text) .TextMatrix(j, 3) = Trim(Combo3(1).Text) .TextMatrix(j, 4) = Trim(Combo3(2).Text) .TextMatrix(j, 5) = Trim(Text3(2)) End With End If
Text3(0) = \ Text3(1) = \ Combo3(0).Clear Combo3(1).Clear Combo3(2).Clear Text3(2) = \
MSFlexGrid1.TopRow = j j = 0 End Sub
Private Sub Command6_Click() Text3(0) = \ Text3(1) = \ Combo3(0).Clear Combo3(1).Clear Combo3(2).Clear Text3(2) = \End Sub
Private Sub Command7_Click() Dim j As Integer
Dim txtSQL As String If Text4(0) = \
MsgBox \清选择要删除的纪录!\提示\ MSFlexGrid1.SetFocus Exit Sub End If
txtSQL = \ Set mrc = ExecuteSQL(txtSQL, MsgText)
MsgBox \考试信息修改成功!\提示\ j = 0
For i = 1 To MSFlexGrid1.Rows - 1
If MSFlexGrid1.TextMatrix(i, 0) = Text4(0) Then j = i End If Next
If j <> 0 Then
With MSFlexGrid1
.TextMatrix(j, 0) = \已删除\ .TextMatrix(j, 1) = \已删除\ .TextMatrix(j, 2) = \已删除\ .TextMatrix(j, 3) = \已删除\ .TextMatrix(j, 4) = \已删除\ .TextMatrix(j, 5) = \已删除\ End With End If
Text4(0) = \ Text4(1) = \ Combo4(0).Clear Combo4(1).Clear Combo4(2).Clear Text4(2) = \End Sub
Private Sub Command8_Click() Text4(0) = \ Text4(1) = \ Combo4(0).Clear Combo4(1).Clear Combo4(2).Clear Text4(2) = \End Sub
Private Sub Form_Load() Option1(1).Value = True Picture1(0).Visible = False Picture1(1).Visible = True Picture1(2).Visible = False Picture1(3).Visible = False
Picture1(1).Top = Picture1(0).Top Picture1(1).Left = Picture1(0).Left Picture1(2).Top = Picture1(0).Top Picture1(2).Left = Picture1(0).Left Picture1(3).Top = Picture1(0).Top Picture1(3).Left = Picture1(0).Left With MSFlexGrid1 .Cols = 6
.TextMatrix(0, 1) = \考试期号\ .TextMatrix(0, 2) = \学生班号\ .TextMatrix(0, 3) = \学生编号\ .TextMatrix(0, 4) = \考试课程\ .TextMatrix(0, 5) = \考试分数\ .ColWidth(0) = 0 .ColWidth(1) = 1550 .ColWidth(2) = 1550 .ColWidth(3) = 1550 .ColWidth(4) = 1550 .ColWidth(5) = 1550 .Rows = 1 End With
Text1(0) = GetRkno End Sub
Private Sub Form_Resize() dColor.ZOrder 1 End Sub
Private Sub MSFlexGrid1_Click() Dim txtSQL As String
If MSFlexGrid1.Row <> 0 Then
Text3(0) = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0) Text3(1) = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 1) Combo3(0).Clear
Combo3(0).AddItem MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2) Combo3(0).ListIndex = 0
txtSQL = \
Set mrc = ExecuteSQL(txtSQL, MsgText) If mrc.EOF = False Then With Combo3(0)
Do While Not mrc.EOF
If mrc!class_NO <> .Text Then .AddItem Trim(mrc!class_NO) End If
mrc.MoveNext Loop End With End If
Combo3(1).Clear
Combo3(1).AddItem MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 3) Combo3(1).ListIndex = 0 Combo3(2).Clear
Combo3(2).AddItem MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 4) Combo3(2).ListIndex = 0
Text3(2) = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 5) Text4(0) = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0) Text4(1) = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 1) Combo4(0).Clear
Combo4(0).AddItem MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2) Combo4(0).ListIndex = 0 Combo4(1).Clear
Combo4(1).AddItem MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 3) Combo4(1).ListIndex = 0 Combo4(2).Clear
Combo4(2).AddItem MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 4) Combo4(2).ListIndex = 0
Text4(2) = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 5) End If End Sub
Private Sub Option1_Click(Index As Integer) Dim txSQL As String
Me.Caption = \成绩信息->\
Me.Caption = Me.Caption & Option1(Index).Caption Option1(0).BackColor = &HC0C0C0 Option1(1).BackColor = &HC0C0C0 Option1(2).BackColor = &HC0C0C0 Option1(3).BackColor = &HC0C0C0
Option1(Index).BackColor = &H80000005 Picture1(0).Visible = False Picture1(1).Visible = False Picture1(2).Visible = False Picture1(3).Visible = False Picture1(Index).Visible = True
txSQL = \ Set mrc = ExecuteSQL(txSQL, MsgText) If mrc.EOF = True Then
MsgBox \请先进行班级设置!\提示\ Else
共分享92篇相关文档