【正文】
成,記錄由字段組成,表用來存儲數(shù)據(jù)庫的數(shù)據(jù),故又稱數(shù)據(jù)表。 Access 數(shù)據(jù)庫提供對象來了 7 種完成數(shù)據(jù)庫的功能,這 7 種對象為表、查詢、窗體、報表、頁、宏、模塊。 數(shù)據(jù)庫是整個網(wǎng)站的基礎(chǔ),只有將數(shù)據(jù)庫搭建起來,才能進行模塊的編輯實施。 Access 是 微軟 司推出的基于 Windows的桌面關(guān)系數(shù)據(jù)庫管理系統(tǒng)( RDBMS),是 Office 系列應(yīng)用軟件之一。教學(xué)管理系統(tǒng) 1. 摘要 和 設(shè)計說 明 本論文是在 Access 2020 數(shù)據(jù)庫應(yīng)用教程的指導(dǎo)下,基于數(shù)據(jù)庫技術(shù)的計算機系統(tǒng)能夠有效地采集、存儲、加工、傳輸、編碼、排序、檢索、維護和處理大量的數(shù)據(jù) 。目前,各種數(shù)據(jù)庫系統(tǒng)已經(jīng)成為辦公自動化系統(tǒng)、管理信息系統(tǒng)和決策支持系統(tǒng)的核心,并與計算機網(wǎng)絡(luò)技術(shù)結(jié)合起來,成為電子商務(wù)等各種信息處理系統(tǒng)的核心,得到越來越 多廣泛 的應(yīng)用。它提供了表、查詢、窗體、報表、頁、宏 、模塊 7 種用來建立 數(shù)據(jù)庫系統(tǒng) 的對象;提供了多種向?qū)?、生成器、模板,把?shù)據(jù)存儲、數(shù)據(jù)查詢、界面設(shè)計、報表生成等操作規(guī)范化;為建立功能完善的數(shù)據(jù)庫管理系統(tǒng)提供了方便,也使得普通用戶不必編寫代碼,就可以完成大部分數(shù)據(jù)管理的任務(wù)。這里采用的是數(shù)據(jù)庫的開發(fā)工具 Microsoft Access 2020。 表( Table):表是數(shù)據(jù)庫的基本對象,是創(chuàng)建其他 5種 對象的基礎(chǔ)。 查詢( Query):查詢可以按索引快速查找到需要的記錄。 窗體( Form):窗體提供了一種方便的瀏覽,輸入及更改數(shù)據(jù)的窗口。窗體也稱表單。 宏 (Macro):宏相當(dāng)于 DOS 中的批處理,用來自動執(zhí)行一系列操作。 模塊( Module):模塊的功能與洪類似,但它定義的操作比宏更精細和復(fù)雜,擁護可以根據(jù)自己的需要編寫程序。通過數(shù)據(jù)訪問頁講數(shù)據(jù)發(fā)布到 Inter 或 Intra 上,并可以是用瀏覽器進行數(shù)據(jù)的維修和操作。 (可以明確知道改表每一字段的名稱、數(shù)據(jù)類型、相當(dāng)屬性等。 ) 例如: 表 1 學(xué)生檔案表 字段名稱 字段類型 必填 字段 說明 學(xué) 號 文本 ( 8) 是 主鍵 姓名 文本 ( 10) 是 性別 文本 ( 2) 否 出生日期 日期時間 否 政治面貌 文本 ( 10) 否 班級編號 文本 ( 8) 否 畢業(yè)學(xué)校 文本 ( 20) 否 ( 1)創(chuàng)建查詢:按編號查詢教師檔案、按姓名查詢教師檔案、按學(xué)生課程編號查詢學(xué)生成績、按姓名查詢、學(xué)號查詢學(xué) 生檔案 。 ) 。 (使用窗體可以是數(shù)據(jù)庫中數(shù)據(jù)的輸入、查看和維護操作變得更加直觀和方便。從而為用戶提供了操作的便利性和友好性,同時也又助于提高數(shù)據(jù)的準(zhǔn)確性、安全性與可靠性 。 ( 3) 創(chuàng)建報表:學(xué)生基本信息表 。) 例如: ( 4) 創(chuàng)建宏:按教師編號查詢、按教師姓名查詢、按學(xué)生姓名查詢、按學(xué)生學(xué)號查詢、課程名。具體說,首先創(chuàng)建相應(yīng)的宏,再通過 宏將已經(jīng)創(chuàng)建好的有關(guān)查詢對象連接到窗體特定的命令按鈕上,當(dāng)單擊該命令按鈕時即可實現(xiàn)運行相應(yīng)的宏,從而執(zhí)行該宏所對應(yīng)的查詢并將查詢結(jié)果顯示出來。 ChrW(25945) amp。 ChrW(22995) amp。 ChrW(26597) amp。 ChrW(25945) amp。 ChrW(32534) amp。 ChrW(26597) amp。 ChrW(29698) amp。 ChrW(21517) amp。 ChrW(29726) stDocName Exit_Command10_Click: Exit Sub Err_Command10_Click: MsgBox Resume Exit_Command10_Click End Sub Private Sub Command11_Click() On Error GoTo Err_Command11_Click Dim stDocName As String stDocName = ChrW(25353) amp。 ChrW(31243) amp。 ChrW(21035) amp。 ChrW(29698) amp。 ChrW(23398) amp。 ChrW(26597) stDocName Exit_Command12_Click: Exit Sub Err_Command12_Click: MsgBox Resume Exit_Command12_Click End Sub Private Sub Command15_Click() On Error GoTo Err_Command15_Click Dim stDocName As String stDocName = ChrW(25353) amp。 ChrW(31243) amp。 ChrW(26597) amp。 ChrW(29698) amp。 ChrW(23398) amp。 ChrW(26597) stDocName Exit_Command16_Click: Exit Sub Err_Command16_Click: MsgBox Resume Exit_Command16_Click End Sub Private Sub Command17_Click() On Error GoTo Err_Command17_Click Dim stDocName As String stDocName = ChrW(25353) amp。 ChrW(31243) amp。 ChrW(21035) amp。 ChrW(31243) amp。 ChrW(23398) amp。 ChrW(22995) amp。 ChrW(26597) stDocName Exit_Command20_Click: Exit Sub Err_Command20_Click: MsgBox Resume Exit_Command20_Click End Sub Private Sub Command21_Click() On Error GoTo Err_Command21_Click Dim stDocName As String stDocName = ChrW(25353) amp。 ChrW(29983) amp。 ChrW(21495) amp。 ChrW(29726) stDocName Exit_Command21_Click: Exit Sub Err_Command21_Click: MsgBox Resume Exit_Command21_Click End Sub Private Sub Form_Current() End Sub ( 6)學(xué)生成績子窗體 代碼: Option Compare Database Private Sub Form_Current() End Sub ( 6)學(xué)生信息查詢 代碼: Option Compare Database Private Sub Command18_Click() On Error GoTo Err_Command18_Click Dim stDocName As String stDocName = ChrW(25353) amp。 ChrW(29983) amp。 ChrW(21517) amp。 ChrW(29698) amp。 ChrW(23398) amp。 ChrW(26597) stDocName Exit_Command19_Click: Exit Sub Err_Command19_Click: MsgBox Resume Exit_Command19_Click End Sub Private Sub Command20_Click() On Error GoTo Err_Command20_Click Exit_Command20_Click: Exit Sub Err_Command20_Click: MsgBox Resume Exit_Command20_Click End Sub Private Sub Command21_Click() On Error GoTo Err_Command21_Click Dim stDocName As String stDocName = ChrW(25353) amp。 ChrW(31243) amp。 ChrW(20998) amp。 ChrW(31243) amp。 Minimize the database window and initialize the form. 39。默認 39。 Update the caption and fill in the list of options. = Nz(Me![ItemText], ) FillOptions End Sub Private Sub FillOptions() 39。 The number of buttons on the form. Const conNumButtons = 8 Dim con As Object Dim rs As Object Dim stSql As String Dim intOption As Integer 39。 and then hide all of the buttons on the form 39。t hide the field with the focus. Me![Option1].SetFocus For intOption = 2 To conNumButtons Me(Option amp。 intOption).Visible = False Next intOption 39。 the first item for this Switchboard Page. Set con = stSql = SELECT * FROM [Switchboard Items] stSql = stSql amp。 Me![SwitchboardID] stSql = stSql amp。 Set rs = CreateObject() stSql, con, 1 39。 If there are no options for this Switchboard Page, 39。 Else While (Not ()) Me(Option amp。 rs![ItemNu