Dim myBookmark As Variant
If Not Testtxt(comboGrade.Text) Then
MsgBox "请先选择年级!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Not Testtxt(listSelectcourse.List(0)) Then
MsgBox "请选择课程!", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
txtSQL = "select * from gradecourse_Info where grade = '" & Trim(comboGrade.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF Then
For i = 1 To listSelectcourse.ListCount
mrc.AddNew
mrc.Fields(0) = comboGrade.Text
mrc.Fields(1) = listSelectcourse.List(i - 1)
mrc.Update
Next i
mrc.Close
MsgBox "课程设置成功!", vbOKOnly + vbExclamation, "警告"
Else
mrc.Close
txtSQL = "delete from gradecourse_Info where grade = '" & Trim(comboGrade.Text) & "'"
Set mrcc = ExecuteSQL(txtSQL, MsgText)
txtSQL = "select * from gradecourse_Info "
Set mrcc = ExecuteSQL(txtSQL, MsgText)
For i = 1 To listSelectcourse.ListCount
mrcc.AddNew
mrcc.Fields(0) = comboGrade.Text
mrcc.Fields(1) = listSelectcourse.List(i - 1)
mrcc.Update
Next i
mrcc.Close
MsgBox "课程设置成功!", vbOKOnly + vbExclamation, "警告"
End If
<< 上一页 [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] ... 下一页 >>