【正文】
itchboardID]= amp。 On Error GoTo 0 39。 Any other mand is unrecognized. Case Else MsgBox 未知選項(xiàng)。 Access 2020是 Microsoft Office 2020 的辦公軟件的一個(gè)重要組成部分,我們可以拿它來操作好友的用戶界面 ,還 可以 在開發(fā)者所創(chuàng)建的各種窗體 對(duì)數(shù)據(jù)進(jìn)行輸入、修改和輸出 ,應(yīng)用程序的控制與驅(qū)動(dòng)等。 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。 the first item for this Switchboard Page. Set con = stSql = SELECT * FROM [Switchboard Items] stSql = stSql amp。 Else While (Not ()) Me(Option amp。 An error that is special cased. Const conErrDoCmdCancelled = 2501 Dim con As Object Dim rs As Object Dim stSql As String On Error GoTo HandleButtonClick_Err 39。 If no item matches, report the error and exit the function. If () Then MsgBox 讀取 Switchboard Items 表時(shí)出錯(cuò)。 Handle the case where the Switchboard Manager 39。 Run code. Case conCmdRunCode rs![Argument] 39。 Instead, resume on the next line. If (Err = conErrDoCmdCancelled) Then Resume Next Else MsgBox 執(zhí)行命令時(shí)出錯(cuò)。 Close the recordset and the database. HandleButtonClick_Exit: On Error Resume Next Set rs = Nothing Set con = Nothing Exit Function HandleButtonClick_Err: 39。默認(rèn) 39。 Open a form in Add mode. Case conCmdOpenFormAdd rs![Argument], , , , acAdd 39。 Me![SwitchboardID] amp。 Close the recordset and the database. Set rs = Nothing Set con = Nothing End Sub Private Function HandleButtonClick(intBtn As Integer) 39。 Set rs = CreateObject() stSql, con, 1 39。t hide the field with the focus. Me![Option1].SetFocus For intOption = 2 To conNumButtons Me(Option amp。 總之,這次“教學(xué)管理系統(tǒng)”的設(shè)計(jì),更進(jìn)一步加強(qiáng)了我對(duì)數(shù)據(jù)庫的了解以及運(yùn)用知識(shí)解決實(shí)際問題的能力,并且達(dá)到鞏固、擴(kuò)大所學(xué)專業(yè)的廣泛性,使自身得到很大的提高。 some reason, don39。 Exit the application. Case conCmdExitApplication CloseCurrentDatabase 39。 Open a report. Case conCmdOpenReport rs![Argument], acPreview 39。 intBtn stSql, con, 1 39。 intBtn indicates which button was clicked. 39。 If there are no options for this Switchboard Page, 39。 intOption).Visible = False Next intOption 39。 Update the caption and fill in the list of options. = Nz(Me![ItemText], ) FillOptions End Sub Private Sub FillOptions() 39。 ChrW(20998) amp。 ChrW(29698) amp。 ChrW(21495) 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(29698) amp。 ChrW(26597) amp。) 例如: ( 4) 創(chuàng)建宏:按教師編號(hào)查詢、按教師姓名查詢、按學(xué)生姓名查詢、按學(xué)生學(xué)號(hào)查詢、課程名。 ) 。 模塊( Module):模塊的功能與洪類似,但它定義的操作比宏更精細(xì)和復(fù)雜,擁護(hù)可以根據(jù)自己的需要編寫程序。 查詢( Query):查詢可以按索引快速查找到需要的記錄。目前,各種數(shù)據(jù)庫系統(tǒng)已經(jīng)成為辦公自動(dòng)化系統(tǒng)、管理信息系統(tǒng)和決策支持系統(tǒng)的核心,并與計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)結(jié)合起來,成為電子商務(wù)等各種信息處理系統(tǒng)的核心,得到越來越 多廣泛 的應(yīng)用。 Access 數(shù)據(jù)庫提供對(duì)象來了 7 種完成數(shù)據(jù)庫的功能,這 7 種對(duì)象為表、查詢、窗體、報(bào)表、頁、宏、模塊。 報(bào)表( Report):報(bào)表的功能是將數(shù)據(jù)庫中的數(shù)據(jù)分類匯總,然后打印出來,以便分析。要想創(chuàng)建一個(gè)表,首先需要設(shè)計(jì)和創(chuàng)建表的結(jié)構(gòu),然后再輸入數(shù)據(jù) 。 ) 。 ChrW(24072) amp。 ChrW(21495) amp。 ChrW(29698) amp。 ChrW(20998) amp。 ChrW(31243) amp。 ChrW(26597) stDocName Exit_Command17_Click: Exit Sub Err_Command17_Click: MsgBox Resume Exit_Command17_Click End Sub Private Sub Command18_Click() On Error GoTo Err_Command18_Click Exit_Command18_Click: Exit Sub Err_Command18_Click: MsgBox Resume Exit_Command18_Click End Sub Private Sub Command19_Click() On Error GoTo Err_Command19_Click Dim stDocName As String stDocName = ChrW(29698) amp。 ChrW(23398) amp。 ChrW(22995) amp。 ChrW(29698) amp。 Move to the switchboard page that is marked as the default. = [ItemNumber] = 0 AND [Argument] = 39。 but the first. You can39。 ORDER BY [ItemNumber]。 rs![ItemNumber]).Caption = rs![ItemText] Wend End If 39。 WHERE [SwitchboardID]= amp。 rs![Argument] 39。 Update the form. = [ItemNumber] = 0 AND [Argument] = 39。 End Select 39。還可以方便數(shù)據(jù)的查詢和檢索,不僅能夠在指定的若干個(gè)表中獲取滿足給定條件的數(shù)據(jù),還可以生成 新 的數(shù)據(jù) 表,并能實(shí)現(xiàn)按要求對(duì)表中記錄進(jìn)行添加、更新和刪除等多種操作 ???? 。 Set the focus to the first button on the form, 39。 WHERE [ItemNumber] 0 AND [SwitchboardID]= amp。 rs![ItemNumber]).Visible = True Me(OptionLabel amp。 Find the item in the Switchboard Items table 39。 Set rs = Nothing Set con = Nothing Exit Function End If Select Case rs![Command] 39。 is not installed (. Minimal Install).