If Not Testtxt(txtCourseno.Text) Then
MsgBox "请输入课程编号!", vbOKOnly + vbExclamation, "警告"
txtCourseno.SetFocus
Exit Sub
End If
If Not Testtxt(txtCoursename.Text) Then
MsgBox "请输入课程名称!", vbOKOnly + vbExclamation, "警告"
txtCoursename.SetFocus
Exit Sub
End If
If Not Testtxt(comboCoursetype.Text) Then
MsgBox "请选择课程类型!", vbOKOnly + vbExclamation, "警告"
comboCoursetype.SetFocus
Exit Sub
End If
If Not Testtxt(txtCoursedes.Text) Then
MsgBox "请输入课程描述信息!", vbOKOnly + vbExclamation, "警告"
txtCoursedes.SetFocus
Exit Sub
End If
If Not IsNumeric(Trim(txtCourseno.Text)) Then
MsgBox "请输入数字编号!", vbOKOnly + vbExclamation, "警告"
Exit Sub
txtCourseno.SetFocus
End If
txtSQL = "select * from course_Info "
Set mrc = ExecuteSQL(txtSQL, MsgText)
While (mrc.EOF = False)
If (Trim(mrc.Fields(0)) = Trim(txtCourseno.Text)) Then
MsgBox "课程编号已经存在,请重新输入课程编号!", vbOKOnly + vbExclamation, "警告"
txtCourseno.Text = ""
txtCourseno.SetFocus
Exit Sub
Else
mrc.MoveNext
End If
<< 上一页 [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] ... 下一页 >>