【正文】
If Not Then (課程號(hào)) = : SendKeys {tab}: vlt = True Else MsgBox 課程號(hào)不存在,重新輸入!, , 輸入驗(yàn)證! vlt=False:=0:= Len() End If End IfEnd SubPrivate Sub Text12_Validate(Cancel As Boolean)If vlt = True Then Cancel = False Else MsgBox 課程號(hào)不存在,重新輸入!, , 輸入驗(yàn)證!: Cancel = True 。 amp。 If Not Then (學(xué)號(hào)) = : SendKeys {tab}: vlt = True Else MsgBox 學(xué)號(hào)不存在,重新輸入!, , 輸入驗(yàn)證! vlt = False: = 0: = Len() End If End IfEnd SubPrivate Sub Text11_Validate(Cancel As Boolean)If vlt = True Then Cancel = False Else MsgBox 學(xué)號(hào)不存在,重新輸入!, , 輸入驗(yàn)證!Cancel = TrueEnd IfEnd SubPrivate Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer)Dim kch As StringIf KeyCode = vbKeyReturn Then 課程號(hào)=39。 amp。 If Not Then (課程號(hào)) = Else Exit Do End If Loop : SendKeys {tab}: vlt = True Else MsgBox 課程號(hào)重號(hào),重新輸入!, , 輸入驗(yàn)證! = rn: vlt = False: = 0 = Len() End IfEnd IfEnd SubPrivate Sub Text5_Validate(Cancel As Boolean)If vlt = True ThenCancel = False Else MsgBox 課程號(hào)重號(hào),重新輸入!, , 輸入驗(yàn)證!Cancel = TrueEnd IfEnd SubPrivate Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)Dim xh As StringIf KeyCode = vbKeyReturn Then 學(xué)號(hào)=39。 kch amp。 If Then = rn: kch = (課程號(hào)) (課程號(hào)) = : Do 課程號(hào)=39。 amp。 If Not Then (學(xué)號(hào)) = Else Exit Do End If Loop : SendKeys {tab} : vlt = True Else MsgBox 學(xué)號(hào)重號(hào),重新輸入!, , 輸入驗(yàn)證! = rn : vlt = False: = 0 = Len() End IfEnd IfEnd SubPrivate Sub Text1_Validate(Cancel As Boolean)If vlt = True Then Cancel = FalseElse MsgBox 學(xué)號(hào)重號(hào),重新輸入!, , 輸入驗(yàn)證!Cancel = TrueEnd IfEnd SubPrivate Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)Dim kch As StringIf KeyCode = vbKeyReturn Then rn = : 課程號(hào)=39。 xh amp。 If Then = rn: xh = (學(xué)號(hào)) (學(xué)號(hào)) = Do 學(xué)號(hào)=39。 amp。 If Not Then : Else Exit Do End If Loop : Case 2 : End Select End IfCase 3 Select Case Case 0: Case 1: Case 2: End Select Command1(3).Enabled = False: Command1(4).Enabled = False Command1(5).Enabled = True: Command1(6).Enabled = TrueCase 4 Select Case Case 0 If Not And 1 Then Else Command1(3).Enabled = False: Command1(4).Enabled = False End If Case 1 If Not And 1 Then Else Command1(3).Enabled = False: Command1(4).Enabled = False End If Case 2 If Not And 1 Then Else Command1(3).Enabled = False: Command1(4).Enabled = False End If End Select Command1(5).Enabled = True: Command1(6).Enabled = TrueCase 5 Select Case Case 0 If Not And _ Then Else Command1(5).Enabled = False: Command1(6).Enabled = False End If Case 1 If Not And _ Then Else Command1(5).Enabled = False: Command1(6).Enabled = False End If Case 2 If Not And _ Then Else Command1(5).Enabled = False: Command1(6).Enabled = False End If End Select Command1(3).Enabled = True: Command1(4).Enabled = TrueCase 6 Select Case Case 0: Case 1: Case 2: End Select Command1(6).Enabled = False: Command1(5).Enabled = False Command1(4).Enabled = True: Command1(3).Enabled = TrueCase 7 Unload MeEnd SelectIf Not Then = (學(xué)號(hào))If Not Then = (課程號(hào))If Not Then = (學(xué)號(hào)) = (課程號(hào))End IfExit suberrshow: MsgBox End SubPrivate Sub SSTab1_Click(PreviousTab As Integer)If Not Then = (學(xué)號(hào))If Not Then = (課程號(hào))If Not Then = (學(xué)號(hào)) = (課程號(hào))End IfEnd SubPrivate Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)Dim xh As StringIf KeyCode = vbKeyReturn Then rn = : 學(xué)號(hào)=39。 kch amp。 If Not Then : Else Exit Do End If Loop : Case 1 kch = (課程號(hào)): Do 課程號(hào)=39。 xh amp。Text12:DataSource(Adodc3)、DataField(成績(jī))(2)主要事件過程代碼Option ExplicitDim vlt As Boolean, rn As VariantPrivate Sub Form_Load()Dim i As IntegerFor i = 0 To 7 Command1(i).Caption = Mid(追加更新刪除表首前翻后翻表尾返回, 2 * i + 1, 2)Next i Command1(3).Enabled = False: Command1(4).Enabled = False = 學(xué)號(hào): : = 姓名: = 出生年月: : = 獎(jiǎng)學(xué)金: = 性別(選中為男,否則為女) = 課程號(hào): : = 課程名: = 學(xué)時(shí)數(shù): : = 學(xué)分?jǐn)?shù): = 開課學(xué)期:: = 考試考查標(biāo)志: = 學(xué)號(hào): : = 課程號(hào): = 成績(jī) = “追加”、“刪除”或是修改操作完成之后必須按“更新”按鈕 Caption = 學(xué)籍信息瀏覽編輯 =(學(xué)號(hào)): =(課程號(hào)) =(學(xué)號(hào)): =(課程號(hào)) vlt = TrueEnd SubPrivate Sub Command1_Click(Index As Integer)Dim xh As String, kch As String, answer As ByteOn Error GoTo errshowSelect Case IndexCase 0 Select Case Case 0 : (學(xué)號(hào)) = 000000 Case 1 : (課程號(hào)) = 0000 Case 2 : (學(xué)號(hào)) = 000000 (課程號(hào)) = 0000 End SelectCase 1 Select Case Case 0: Case 1: Case 2: End SelectCase 2 answer = MsgBox(真的確定要?jiǎng)h除當(dāng)前記錄嗎?, 1 + 32, 刪除確認(rèn)) If answer = 1 Then Select Case Case 0 xh = (學(xué)號(hào)):