【正文】
nly + vbExclamation, 警告 ! End If End Sub 8 Private Sub addjiaofei_Click() If QX3 = True Then Else MsgBox 對(duì)不起 ,您沒(méi)有權(quán)限 !, vbOKOnly + vbExclamation, 警告 ! End If End Sub Private Sub banjikechengliulan_Click() End Sub Private Sub cengdie_Click() 0 End Sub Private Sub chengji_Click() End Sub Private Sub chengjiadd_Click() If QX4 = True Then flAg = True Else MsgBox 對(duì)不起 ,您沒(méi)有權(quán)限 !, vbOKOnly + vbExclamation, 警告 ! End If End Sub Private Sub chongpai_Click() 3 End Sub Private Sub chuizhi_Click() 2 End Sub Private Sub classkechengset_Click() If QX4 = True Then Else MsgBox 對(duì)不起 ,您沒(méi)有權(quán)限 !, vbOKOnly + vbExclamation, 警告 ! End If End Sub Private Sub danganfind_Click() 9 End Sub Private Sub liulanbiao_Click() End Sub Private Sub jiaofeifind_Click() End Sub Private Sub jiaofeiliulan_Click() End Sub Private Sub jibenkechengset_Click() If QX4 = True Then Else MsgBox 對(duì)不起 ,您沒(méi)有權(quán)限 !, vbOKOnly + vbExclamation, 警告 ! End If End Sub Private Sub kecheng_Click() End Sub Private Sub liulanchengjibiao_Click() End Sub Private Sub liulandanganbiao_Click() End Sub Private Sub MDIForm_Load() (2) = Now OpenTable Adodc1, use = select * from use where username = 39。此窗體與數(shù)據(jù)輪中的 student 表進(jìn)行連接。 確定么 ?, vbYesNo + vbExclamation, 警告 ) = vbYes Then If MsgBox(真的要?jiǎng)h除么? , vbYesNo + vbExclamation, 警告! ) = vbYes Then MsgBox 刪除成功! , vbOKOnly + vbInformation, 提示! End If End If Else MsgBox 對(duì)不起 ,您沒(méi)有權(quán)限 !, vbOKOnly + vbExclamation, 警告 ! End If End Sub Private Sub Command4_Click() Unload Me End Sub Private Sub Form_Load() 39。 不能為空 ! , vbExclamation + vbOKOnly, 警告 f = False Text1(j).SetFocus Exit Sub End If Next j 39。添加保存后清空文本 For j = 0 To 5 Text1(j).Text = Next j End If End Sub Private Sub Command2_Click() 39。定義 sql語(yǔ)言 Dim sqlxuehao As String Dim sqlxingming As String Dim sqlbanji As String sqlxuehao = select * from student where 學(xué)號(hào) =39。 sqlbanji = select * from student where 班級(jí) =39。回車換下一個(gè)輸入項(xiàng)目 If KeyAscii = 13 Then SendKeys {TAB} End If End Sub 20 4. 4 成績(jī)管理 4. 4. 1 成績(jī)?yōu)g覽與修改 圖 考試成績(jī)?yōu)g覽 設(shè)計(jì)過(guò)程: 通過(guò)一個(gè) bo 數(shù)組( 4個(gè)),來(lái)實(shí)現(xiàn)各個(gè)信息的選擇,符合的信息會(huì)在下面顯示出來(lái),同時(shí)此窗體同樣可以連接到其它的窗體上,例如修改。 會(huì)導(dǎo)致該學(xué)生的信息丟失 ! amp。 amp。 設(shè)計(jì)代碼: Private Sub bo1_KeyPress(KeyAscii As Integer) 39。確定后執(zhí)行的語(yǔ)句 If MsgBox(確定要添加么? , vbYesNo + vbInformation, 提示 ) = vbYes Then MsgBox 添加成功! , vbOKOnly + vbInformation, 提示 39?;剀嚀Q下一個(gè)輸入項(xiàng)目 If KeyAscii = 13 Then 26 SendKeys {TAB} End If End Sub Private Sub text2_KeyPress(KeyAscii As Integer) 39。 amp。 amp。 29 39。取消添加 = False = True = True = 增加 = True = Else 39?;剀嚀Q下一個(gè)輸入項(xiàng)目 If KeyAscii = 13 Then SendKeys {TAB} End If 34 End Sub Private Sub Combo3_KeyPress(KeyAscii As Integer) 39。 不能為空 ! , vbExclamation + vbOKOnly, 警告 Exit Sub End If If = Then MsgBox Label2(4).Caption amp。刪除語(yǔ)句 If MsgBox(確定要?jiǎng)h除記錄么? , vbYesNo + vbExclamation, 警告 ) = vbYes Then If MsgBox(真的要?jiǎng)h除么? , vbYesNo + vbExclamation, 警告! ) = vbYes Then MsgBox 刪除成功! , vbOKOnly + vbInformation, 提示! End If End If Else MsgBox 對(duì) 不起 ,您沒(méi)有權(quán)限 !, vbOKOnly + vbExclamation, 警告 ! End If End Sub Private Sub Form_Load() 39。 不能為空 ! , vbExclamation + vbOKOnly, 警告 Exit Sub End If If = Then MsgBox amp。數(shù)據(jù)傳遞到數(shù)據(jù)庫(kù) !姓名 = !學(xué)號(hào) = !學(xué)期 = !交費(fèi) = !日期 = !欠費(fèi) = !學(xué)費(fèi) Val() MsgBox 您還欠費(fèi) amp。找到這個(gè)專業(yè)的交費(fèi)金額 sqlzhuanye = select * from tuition where 專業(yè) =39?;剀嚀Q下一個(gè)輸入項(xiàng)目 If KeyAscii = 13 Then SendKeys {TAB} End If If KeyAscii = 8 Then = End If If KeyAscii 48 Or KeyAscii 57 Then KeyAscii = 0 End If End Sub Private Sub text5_KeyPress(KeyAscii As Integer) 39。 sqlxingming = select * from Studtuition where 姓名 =39。初始化 bo2 的值 Do Until !姓名 Loop End Sub 46 4. 課程設(shè)定 4. 6. 1 基本課程設(shè)計(jì) 圖 基本課程設(shè)計(jì) 設(shè)計(jì)過(guò)程: 每個(gè)不同的專業(yè)都可以設(shè)置不同的課程,前提是要設(shè)置全部的課程和對(duì)應(yīng)的書。取消添加 = False = True = True = 增加 = True = = Else 39。 amp。提示選課與否 If = 0 Then MsgBox 您還沒(méi)有選課! , vbOKOnly + vbInformation, 提示! End If 55 For i = 0 To 1 39。 39。 39。打開(kāi)數(shù)據(jù)庫(kù)中的 Allcourse 表 OpenTable Adodc1, Allcourse 39?;剀嚀Q下一個(gè)輸入項(xiàng)目 If KeyAscii = 13 Then SendKeys {TAB} End If End Sub Private Sub text2_KeyPress(KeyAscii As Integer) 39。增加基本課程的代碼 If = 加入列表 The If = Then MsgBox 課程名稱不能為空! , vbOKOnly + vbExclamation, 警告 Exit Sub End If If = Then MsgBox 教材不能為空! , vbOKOnly + vbExclamation, 警告 Exit Sub End If 39。 If = And = Then 44 = 至少一條記錄不空 Exit Sub End If If Then = sqlxuehao End If If Then = sqlxingming End If If Then MsgBox 無(wú)此記錄 , vbOKOnly + vbInformation, 提示 End If Unload Me End Sub Private Sub Form_Activate() End Sub Private Sub bo1_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Then = End If If KeyAscii 48 Or KeyAscii 57 Then KeyAscii = 0 45 End If 39。定義 sql語(yǔ)言 Dim sqlxuehao As String Dim sqlxingming As String sqlxuehao = select * from Studtuition where 學(xué)號(hào) =39。 = sqlzhuanye 39。打開(kāi)數(shù)據(jù)庫(kù)中的 Tuition 表 OpenTable Adodc1, Tuition End Sub Private Sub bo1_KeyPress(KeyAscii As Integer) 39。 amp。 設(shè)計(jì)代碼 Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Activate