【正文】
tBorndate = Format(txtBorndate, yyyymmdd) If Not IsDate() Then MsgBox 入校時間應(yīng)輸入日期格式(yyyymmdd)!, vbOKOnly + vbExclamation, 警告 Else txtRudate = Format(txtRudate, yyyymmdd) (0) = Trim() (1) = Trim() (2) = Trim() (3) = Trim() (4) = Trim() (5) = Trim() (6) = Trim() (7) = Trim() (8) = Trim() MsgBox 修改學(xué)籍信息成功!, vbOKOnly + vbExclamation, 修改學(xué)籍信息 = myBookmark Call viewData = True = True = True = True = True = False = False = False = False = False = False = False = False = False mcclean = True End If End If End If End Sub修改成績信息窗口:Dim mrc As Dim myBookmark As VariantDim mcclean As BooleanPrivate Sub editCommand_Click() mcclean = False = False = False = False = False = False = True = True = True = True = True = True = True = True = True myBookmark = End SubPrivate Sub cancelCommand_Click() If Not mcclean Then = True = True = True = True = True = False = False = False = False = False = False = False = False = False = myBookmark Call viewData Else MsgBox 什么都沒有修改,有什么好取消的!, vbOKOnly + vbExclamation, 警告 End If End SubPrivate Sub deleteCommand_Click() myBookmark = str2$ = MsgBox(是否刪除當(dāng)前記錄?, vbOKCancel, 刪除當(dāng)前記錄) If str2$ = vbOK Then If Then myBookmark = = myBookmark Call viewData Else myBookmark = = myBookmark Call viewData End If Else = myBookmark Call viewData End IfEnd SubPrivate Sub firstCommand_Click() Call viewDataEnd SubPrivate Sub Form_Load() Dim txtSQL As String Dim MsgText As String txtSQL = select * from student_Info Set mrc = ExecuteSQL(txtSQL, MsgText) Call viewData mcbookmark = mcclean = True End SubPublic Sub viewData() = (0) = (1) = (2) = Format((3), yyyymmdd) = (4) = (5) = Format((6), yyyymmdd) = (7) = (8)End SubPrivate Sub lastCommand_Click() Call viewDataEnd SubPrivate Sub nextCommand_Click() If Then End If Call viewDataEnd SubPrivate Sub previousCommand_Click() If Then End If Call viewDataEnd SubPrivate Sub updateCommand_Click() Dim txtSQL As String Dim MsgText As String Dim mrcc As If mcclean Then MsgBox 請先修改學(xué)籍信息, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請輸入學(xué)號!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請輸入姓名!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請選擇性別!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請輸入出生日期!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請選擇班號!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請輸入聯(lián)系電話!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請輸入入校日期!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not Testtxt() Then MsgBox 請輸入家庭住址!, vbOKOnly + vbExclamation, 警告 Exit Sub End If If Not IsNumeric(Trim()) Then MsgBox 學(xué)號請輸入數(shù)字!, vbOKOnly + vbExclamation, 警告 Exit Sub End If txtSQL = select * from student_Info where student_ID = 39。 amp。 Trim() amp。 39。 Set mrcc = ExecuteSQL(txtSQL, MsgText) If = False Then MsgBox 學(xué)號重復(fù),請重新輸入!, vbOKOnly + vbExclamation, 警告 Else If Not IsDate() Then MsgBox 出生時間應(yīng)輸入日期格式(yyyymmdd)!, vbOKOnly + vbExclamation, 警告 Else txtBorndate = Format(txtBorndate, yyyymmdd) If Not IsDate() Then MsgBox 入校時間應(yīng)輸入日期格式(yyyymmdd)!, vbOKOnly + vbExclamation, 警告 Else txtRudate = Format(txtRudate, yyyymmdd) (0) = Trim() (1) = Trim() (2) = Trim() (3) = Trim() (4) = Trim() (5) = Trim() (6) = Trim() (7) = Trim() (8) = Trim() MsgBox 修改學(xué)籍信息成功!, vbOKOnly + vbExclamation, 修改學(xué)籍信息