If Not Testtxt(txtRudate.Text) Then
MsgBox "请输入入校日期!", vbOKOnly + vbExclamation, "警告"
txtRudate.SetFocus
Exit Sub
End If
If Not Testtxt(txtAddress.Text) Then
MsgBox "请输入家庭住址!", vbOKOnly + vbExclamation, "警告"
txtAddress.SetFocus
Exit Sub
End If
If Not IsNumeric(Trim(txtSID.Text)) Then
MsgBox "请输入数字!", vbOKOnly + vbExclamation, "警告"
Exit Sub
txtSID.SetFocus
End If
txtSQL = "select * from student_Info where student_ID = '" & Trim(txtSID.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = False Then
MsgBox "学号重复,请重新输入!", vbOKOnly + vbExclamation, "警告"
mrc.Close
txtSID.SetFocus
Else
mrc.Close
If Not IsDate(txtBorndate.Text) Then
MsgBox "出生时间应输入日期格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
txtBorndate.SetFocus
Else
txtBorndate = Format(txtBorndate, "yyyy-mm-dd")
If Not IsDate(txtRudate.Text) Then
MsgBox "入校时间应输入日期格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
txtRudate.SetFocus
Else
txtRudate = Format(txtRudate, "yyyy-mm-dd")
txtSQL = "select * from student_Info"
Set mrc = ExecuteSQL(txtSQL, MsgText)
mrc.AddNew
mrc.Fields(0) = Trim(txtSID.Text)
mrc.Fields(1) = Trim(txtName.Text)
<< 上一页 [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] ... 下一页 >>