




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、ACCESS數據表1、班級表,名稱:BJ 字段名 類型 長度 意義MC 字符 20 班級名稱2、籍貫表,名稱:JGMC 字符 18 省市名稱3、用戶表,名稱:YH MC 字符 10 用戶名稱MM 字符 18 密碼4、基本信息表,名稱:JBXX XH 字符 10 學號XM 字符 10 姓名XB 字符 18 性別JG 字符 10 籍貫CS 日期 出生日期主窗口:Private Sub Form_Load()If Form8.s <> "系統管理員" Thenr.Enabled = Falsesgl.Enabled = FalseEnd IfEnd SubPrivat
2、e Sub grcx_Click()Form22.ShowEnd SubPrivate Sub Timer1_Timer()StatusBar1.Panels(2).Text = Date & " " & TimeEnd SubPrivate Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)If Button.Index = 1 Then Form2.ShowIf Button.Index = 2 Then Form12.ShowEnd SubPrivate Sub x_Click()Unl
3、oad MeEnd Sub用戶管理:Private Sub Command1_Click()Adodc1.Recordset.AddNewEnd SubPrivate Sub Command2_Click()If Adodc1.Recordset.Fields(0).Value = "系統管理員" ThenMsgBox "不能刪除系統管理員!"ElseAdodc1.Recordset.DeleteEnd IfEnd SubPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub Command4_Cl
4、ick()Adodc1.Recordset.UpdateEnd SubPrivate Sub Form_Load()Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + App.Path + "yey.mdb"End Sub查詢:Private Sub Command3_Click()Unload MeEnd SubPrivate Sub Command4_Click()Adodc1.RecordSo
5、urce = "select * from jbxx where xm='" + Text6 + "'"Adodc1.RefreshIf Adodc1.Recordset.RecordCount = 0 Then MsgBox "無此人!"End SubPrivate Sub Form_Load()Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source="
6、 + App.Path + "yey.mdb"End Sub班級管理:Private Sub Command1_Click()Adodc1.Recordset.AddNewEnd SubPrivate Sub Command2_Click()Adodc1.Recordset.DeleteEnd SubPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub Command4_Click()Adodc1.Recordset.UpdateEnd SubPrivate Sub Form_Load()Adodc1.Connect
7、ionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + App.Path + "yey.mdb"End Sub登錄:Public s$Private Sub Command1_Click()s = Combo1.TextAdodc1.RecordSource = "select * from yh where mc='" + Combo1.Text + "'"Adodc1.R
8、efreshIf Adodc1.Recordset.Fields(1).Value = Text1 ThenUnload MeForm1.ShowElseMsgBox "密碼錯誤!"End IfEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Form_Load()Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + App.
9、Path + "yey.mdb"Adodc1.RecordSource = "select * from yh"Adodc1.RefreshCombo1.ClearDo While Not Adodc1.Recordset.EOFCombo1.AddItem Adodc1.Recordset.Fields(0).ValueAdodc1.Recordset.MoveNextLoopEnd Sub基本信息:Private Sub Command1_Click()Adodc1.Recordset.AddNewEnd SubPrivate Sub Command
10、2_Click()Adodc1.Recordset.DeleteEnd SubPrivate Sub Command3_Click()Unload MeEnd SubPrivate Sub Command4_Click()If Text1 = "" Or Text2 = "" Or Text4 = "" Or Combo1.Text = "" Or Combo2.Text = "" Or Combo3.Text = "" Or Combo4.Text = "&quo
11、t; ThenMsgBox "數據不全!"ElseAdodc1.Recordset.UpdateAdodc1.Recordset.MoveNextEnd IfEnd SubPrivate Sub Command5_Click()CommonDialog1.ShowOpenDim s$, s1$, s2$, i%s = ""s2 = CommonDialog1.For i = LenB(s2) To 1 Step -1s1 = Mid(s2, i, 1)If s1 <> "" Thens = s1 + sElseExit F
12、orEnd IfNextImage1.Picture = LoadPicture(App.Path + "image" + s)Text3 = sEnd SubPrivate Sub Form_Load()Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + App.Path + "yey.mdb"Adodc2.RecordSource = "select * from
13、bm"Adodc2.RefreshCombo1.ClearDo While Not Adodc2.Recordset.EOFCombo1.AddItem Adodc2.Recordset.Fields(0).ValueAdodc2.Recordset.MoveNextLoopAdodc2.RecordSource = "select * from zw"Adodc2.RefreshCombo2.ClearDo While Not Adodc2.Recordset.EOFCombo2.AddItem Adodc2.Recordset.Fields(0).ValueA
14、dodc2.Recordset.MoveNextLoopAdodc2.RecordSource = "select * from zc"Adodc2.RefreshCombo3.ClearDo While Not Adodc2.Recordset.EOFCombo3.AddItem Adodc2.Recordset.Fields(0).ValueAdodc2.Recordset.MoveNextLoopAdodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info
15、=False;Data Source=" + App.Path + "yey.mdb"Adodc1.RecordSource = "select bh as 編號,xm as 姓名,xb as 性別,cs as 出生日期,bm as 部門,zw as 職位,zc as 職稱,zp as 照片 from jbxx"Adodc1.RefreshEnd SubPrivate Sub Text3_Change()If Text3 <> "" ThenImage1.Picture = LoadPicture(App.Pat
16、h + "image" + Text3)ElseImage1.Picture = LoadPicture()End IfEnd Sub按班級統計:Private Sub Command1_Click()Unload MeEnd SubPrivate Sub Form_Load()Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + App.Path + "yey.mdb"Adodc
17、1.RecordSource = "select bm as 部門,count(xm) as 人數 from jbxx group by bm"Adodc1.RefreshEnd Sub綜合查詢:Private Sub Command1_Click()Unload MeEnd SubPrivate Sub Form_Load()Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" + App.Path +
18、 "yey.mdb"Adodc2.RecordSource = "select xm from jbxx"Adodc2.RefreshList1.ClearDo While Not Adodc2.Recordset.EOFList1.AddItem Adodc2.Recordset.Fields(0).ValueAdodc2.Recordset.MoveNextLoopAdodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;
19、Data Source=" + App.Path + "yey.mdb"Option1.Value = TrueEnd SubPrivate Sub List1_Click()Dim s$s = List1.TextIf Option1.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,rq as 日期,sx as 時間,cq as 出勤情況 from kq where xm='" + s + "'"Adodc1.RefreshElseIf Opt
20、ion2.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,rq as 日期,LB as 類別,JB as 級別 from JC where xm='" + s + "'"Adodc1.RefreshElseIf Option3.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,xl as 學歷,xx as 畢業院校,pxdw as 培訓單位,qsrq as 起始日期,jsrq as 結束日期 from p
21、x where xm='" + s + "'"Adodc1.RefreshElseIf Option4.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,rq as 日期,KPXM as 項目,FS as 分數 from KP where xm='" + s + "'"Adodc1.RefreshElseIf Option5.Value = True ThenAdodc1.RecordSource = "select xm
22、 as 姓名,rq as 日期,FS as 分數,JBGZ as 基本工資,FDGZ as 浮動工資,ZGZ as 總工資 from gz where xm='" + s + "'"Adodc1.RefreshEnd IfEnd SubPrivate Sub Option1_Click()Dim s$s = List1.TextIf Option1.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,rq as 日期,sx as 時間,cq as 出勤情況 from kq whe
23、re xm='" + s + "'"Adodc1.RefreshEnd IfEnd SubPrivate Sub Option2_Click()Dim s$s = List1.TextIf Option2.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,rq as 日期,LB as 類別,JB as 級別 from JC where xm='" + s + "'"Adodc1.RefreshEnd IfEnd SubPrivate
24、 Sub Option3_Click()Dim s$s = List1.TextIf Option3.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,xl as 學歷,xx as 畢業院校,pxdw as 培訓單位,qsrq as 起始日期,jsrq as 結束日期 from px where xm='" + s + "'"Adodc1.RefreshEnd IfEnd SubPrivate Sub Option4_Click()Dim s$s = List1.TextIf Option4.Value = True ThenAdodc1.RecordSource = "select xm as 姓名,rq as 日期,KPXM as 項目,FS as 分數 from KP
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 畜產品加工與畜產品質量安全保障考核試卷
- 紙容器新型材料開發與應用考核試卷
- 紙制品行業供應鏈管理創新與實踐考核試卷
- 液壓系統在高海拔地區的適應性考核試卷
- 生態農業與綠色食品經濟考核試卷
- 油料作物種植園農業信息化建設考核試卷
- 生態補償機制考核試卷
- 石棉在油氣加工中的應用考核試卷
- 玻璃制品可靠性測試考核試卷
- 玉米加工過程中的智能檢測與故障排除考核試卷
- 2023年中石油職稱英語考試通用選讀
- GB/T 7705-2008平版裝潢印刷品
- GB/T 22864-2009毛巾
- GB/T 15923-2010鎳礦石化學分析方法鎳量測定
- 廣西玉林市容縣十里中學九年級化學 酸堿鹽復習課件 人教新課標版
- 30電導率儀作業指導書
- 鏟車三個月、半年、年保養記錄(新)
- 腦電圖(圖譜)課件
- 給水廠畢業設計正文(全)
- 《概率思想對幾個恒等式的證明(論文)9600字》
- 初高中生物銜接課課件
評論
0/150
提交評論