欢迎来到天天文库
浏览记录
ID:14857633
大小:139.00 KB
页数:28页
时间:2018-07-30
《vb access企业数据信息管理系统-附录程序清单及注释》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、vb+access企业数据信息管理系统-附录程序清单及注释附录程序清单及注释菜单窗体OptionExplicitDimsqlAsStringDimblnViewAsBooleanConstMeWidthAsInteger9216ConstMeHeightAsInteger6600'caidan.Width9216'caidan.Height6600PrivateSubabout_ClickForm2.ShowEndSubPrivateSubTSJ_Clickfind1.Showcaidan.HideEndSubPrivateSubclean_ClickDimmydbAsDatabaseD
2、imdbpathAsStringDimsqlAsStringdbpathApp.Path&"SJK.mdb"IfMsgBox"此功能将清除库中所有记录,你确定要执行吗?",vbOKCancelvbOKThenSetmydbOpenDatabasedbpathsql"delete*fromhouse"mydb.Executesqlsql"delete*fromroom"mydb.Executesqlsql"delete*fromstudent"mydb.Executesqlsql"delete*fromcleaner"mydb.ExecutesqlMsgBox"清库完毕!"EndIfEn
3、dSubPrivateSubdatacopy_ClickDimdbAsDatabaseDimdtAsNewTableDefIfMsgBox"是否备份",vbYesNo,"备份"vbYesThenSetdbOpenDatabaseApp.Path&"SJK.mdb"Setdtdb.CreateTableDef"backup1"//.ete"backup1"db.Execute"selecthouse.*intobackup1fromhouse"//.ete"backup2"db.Execute"select*intobackup2fromroom"//.ete"backup3"db.Ex
4、ecute"select*intobackup3fromstudent"//.ete"backup4"db.Execute"select*intobackup4fromcleaner"db.CloseElse:ExitSubEndIfEndSubPrivateSubdatasave_ClickDimdbAsDatabaseDimdtAsNewTableDefIfMsgBox"是否还原",vbYesNo,"还原"vbYesThenSetdbOpenDatabaseApp.Path&"SJK.mdb"//.ete"house"db.Execute"selectbackup1.*intoho
5、usefrombackup1"//.ete"room"db.Execute"select*intoroomfrombackup2"//.ete"student"db.Execute"select*intostudentfrombackup3"//.ete"cleaner"db.Execute"select*intocleanerfrombackup4"db.CloseElseExitSubEndIfEndSubPrivateSubexit_Click'清表DimmydbAsDatabaseDimsqlAsStringIfMsgBox"注意!"+Chr13+"此操作将清所有临时除库中所有记
6、录,你确定要执行吗?",vbOKCancel,"提示"vbOKThenSetmydbOpenDatabaseApp.Path&"SJK.mdb"sql"delete*from查询汇总表"mydb.Executesqlsql"delete*from材料总表"mydb.Executesqlsql"delete*from总标准件表"mydb.Executesqlsql"delete*from总外购件表"mydb.Executesqlsql"delete*from总外协件表"mydb.Executesqlsql"delete*from总图号册表"mydb.ExecutesqlMsgBox"清库
7、完毕!"ElseExitSubEndIfEndEndSubPrivateSubQXSZ_Clickgly_f.ShowEndSubPrivateSubForm_Resize'ifminimizedthenexitIfMe.WindowStatevbMinimizedThenExitSub'iflowerthestandardvaluesresetIfMe.HeightMeHeightThenMe.HeightMeHeightIfMe
此文档下载收益归作者所有