【正文】
39。 amp。 39。 amp。HFFFFFF Then ShowTitle Text1(4).Visible = True = False Text1(2).Enabled = False Text1(3).Enabled = False Text1(7).Enabled = False Text1(8).Enabled = False End If If Label1(3).BackColor = amp。 39。 amp。 39。 amp。 Label2(i).Caption amp。 Label2(i).Caption amp。 , yyyymmdd) Case Else .TextMatrix(.Rows 1, i) = (i) amp。 39。 amp。yyyymmdd39。 39。 amp。yyyymmdd39。 ElsetxtSQL = txtSQL amp。 Trim(Text1(6)) amp。) =39。and Format(student_Esd,39。 Trim(Text1(5)) amp。) =39。 where Format(student_Esd,39。 39。 amp。 Else txtSQL = txtSQL amp。 Trim(Text1(4)) amp。 where student_Cla=39。 39。 amp。 Else txtSQL = txtSQL amp。 Trim(Text1(1)) amp。 where student_Name=39。 39。 amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) If = False Then MsgBox 學(xué)號不能重復(fù)!, vbOKOnly, 警告 Text1(0).SetFocus Exit Sub End If txtSQL = select * from student_Form Set mrc = ExecuteSQL(txtSQL, MsgText) (0) = Trim(Text1(0)) (1) = Trim(Text1(1)) (2) = Trim(Text1(2)) (3) = Trim(Text1(3)) (4) = Trim(Text1(4)) (5) = Trim(Text1(5)) (6) = Trim(Text1(6)) (7) = Trim(Text1(7)) If Text1(8) = Label2(8).Caption Then (8) = Else (8) = Trim(Text1(8)) End If MsgBox 學(xué)籍信息添加成功!, vbOKOnly, 提示 With MSFlexGrid1 .Rows = .Rows + 1 .TextMatrix(.Rows 1, 0) = Trim(Text1(0)) .TextMatrix(.Rows 1, 1) = Trim(Text1(1)) .TextMatrix(.Rows 1, 2) = Trim(Text1(2)) .TextMatrix(.Rows 1, 3) = Trim(Text1(3)) .TextMatrix(.Rows 1, 4) = Trim(Text1(4)) .TextMatrix(.Rows 1, 5) = Trim(Text1(5)) .TextMatrix(.Rows 1, 6) = Trim(Text1(6)) .TextMatrix(.Rows 1, 7) = Trim(Text1(7)) If Text1(8) Label2(8).Caption Then .TextMatrix(.Rows 1, 8) = Trim(Text1(8)) End If End With = 1 TextDcolorEnd SubPrivate Sub Command2_Click() Dim j As Integer Dim txtSQL As String If Text1(5) Label2(5).Caption Then If IsDate(Text1(5)) = False Then MsgBox 起始日期應(yīng)為日期格式(yyyymmdd)!, vbOKOnly, 警告 Text1(5).SetFocus Exit Sub Else Text1(5) = Format(Text1(5), yyyymmdd) End If End If If Text1(6) Label2(6).Caption Then If IsDate(Text1(6)) = False Then MsgBox 起始日期應(yīng)為日期格式(yyyymmdd)!, vbOKOnly, 警告 Text1(6).SetFocus Exit Sub Else Text1(6) = Format(Text1(6), yyyymmdd) End If End If txtSQL = select * from student_Form If Text1(0) Label2(0).Caption Then txtSQL = txtSQL amp。 Trim(Text1(0)) amp。 !, vbOKOnly, 提示 Exit Sub End If End If Next If IsDate(Text1(3)) = False Then MsgBox 出生日期應(yīng)為日期格式(yyyymmdd)!, vbOKOnly, 警告 Text1(3).SetFocus Exit Sub End If If IsDate(Text1(6)) = False Then MsgBox 入學(xué)日期應(yīng)為日期格式(yyyymmdd)!, vbOKOnly, 警告 Text1(6).SetFocus Exit Sub End IftxtSQL = select * from student_Form where student_NO=39。 !, vbOKOnly, 提示 Text1(i).SetFocus Exit Sub End If Else If Text1(i) = Label2(i).Caption Then MsgBox 請 amp。HFFFFFF End If End IfEnd SubPrivate Sub Command1_Click() Dim txtSQL As String For i = 0 To 7 If i 4 Then If Text1(i) = Label2(i).Caption Then MsgBox 請 amp。HFFFFFF Then If Label2(4).Caption = Then = amp。 39。 amp。 39。 amp。HFFFFFF Picture1(Index).Visible = True For i = 0 To 11 Text1(i) = Next = False = FalseEnd SubPrivate Sub ShowData() Dim txSQL As String Dim mrcc As txSQL = select * from class_Form Set mrcc = ExecuteSQL(txSQL, MsgText) With MSFlexGrid1 .ColWidth(0) = 1200 .ColWidth(1) = 1200 .ColWidth(2) = 1200 .ColWidth(3) = 6000 .TextMatrix(0, 0) = 班級編號 .TextMatrix(0, 1) = 班級名稱 .TextMatrix(0, 2) = 導(dǎo)員姓名 .TextMatrix(0, 3) = 備注信息 .Rows = 1 Do While Not .Rows = .Rows + 1 For i = 0 To 1 .TextMatrix(.Rows 1, i) = (i) amp。 Trim(Label2(Index).Caption) For i = 0 To 2 Label2(i).BackColor = amp。HFFFFFF Picture1(0).Visible = TrueEnd SubPrivate Sub Form_Resize() 1End SubPrivate Sub Label2_Click(Index As Integer) = 班級信息 = amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) For i = 8 To 11 Text1(i) = Next MsgBox 班級信息以經(jīng)刪除!, vbOKOnly, 警告 ShowDataEnd SubPrivate Sub Command6_Click() For i = 8 To 11 Text1(i) = NextEnd SubPrivate Sub Form_Load() = 班級信息添 加 Picture1(1).Top = Picture1(0).Top Picture1(1).Left = Picture1(0).Left Picture1(2).Top = Picture1(0).Top Picture1(2).Left = Picture1(0).Left ShowData For i = 0 To 2 Label2(i).BackColor = amp。 Trim(Text1(8)) amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) txtSQL = select * from class_Form Set mrc = ExecuteSQL(txtSQL, MsgText) (0) = Trim(Text1(4)) (1) = Trim(Text1(5)) (2) = Trim(Text1(6)) (3) = Trim(Text1(7)) For i = 4 To 7 Text1(i) = Next MsgBox 班級信息修改成功!, vbOKOnly, 提示 ShowDataEnd SubPrivate Sub Command4_Click() For i = 4 To 7 Text1(i) = NextEnd SubPrivate Sub Command5_Click() txtSQL = delete from class_Form where class_NO=39。 Trim(Text1(4)) amp。 Set mrc = ExecuteSQL(txtSQL, MsgText) If = False Then MsgBox 此班級編號已存在!, vbOKOnly, 警告