学生成绩查询与信息管理系统.docx
《学生成绩查询与信息管理系统.docx》由会员分享,可在线阅读,更多相关《学生成绩查询与信息管理系统.docx(18页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、学生成绩查询与信息管理系统图6.1用户登录界面1.1.1 登录代码Private Sub cmd_cancel_Click()Me!txt_uid = m,Me!txt_pw =”End SubPrivate Sub cmd_ok_Click()Dim conn As New ADODB .ConnectionDim rs As New ADODB .RecordsetDim str As StringDim ctype As String Combo_type.S etFoc u s ctype = Combo_type.Text Set conn = CurrentProject.Conn
2、ection Select Case ctypeCase 学生”str = select * from 学生表 where 学号二str = str & Me!txt_uid & and 密码二& Me!txt_pw & rs.Open str, conn If rs.EOF ThenMsgBox ”学号或密码错误,请重新输入!” Me!txt_uid = Me!txt_pw =Me!txt_uid.SetFocus Else sno = rs!学号 sname 二 rs!姓名 DoCmd.Close acForm, ”用户登录窗体” DoCmd.OpenForm ”学生主窗体” End If
3、 Case ”教师” str = select * from 教师表 where 教工号 str = str & Me!txt_uid & ,nand 密码& Me!txt_pw &10rs.Open str, connIf rs.EOF ThenMsgBox ”教工号或密码错误,请重新输入!”Me!txt_uid =心Me!txt_pw 二”Me!txt_uid.SetFocusElsetno = rs!教工号tname = rs!教师姓名DoCmd.Close acForm, ”用户登录窗体”DoCmd.OpenForm ”教师主窗体”End IfCase ”管理员”If Me!txt_u
4、id nsan Or Me!txt_pw abcdef1 ThenMsgBox ”用户或密码错误,请重新输入!”Me!txt_uid 二Me!txt_pw 二”Me!txt_uid.SetFocusElseadmin = Me!txt_uidDoCmd.Close acForm, ”用户登录窗体”DoCmd.OpenForm ”管理员主窗体”End IfEnd SelectSet rs = NothingSet conn = NothingEnd Sub6.2 学生用户主窗体学生所有的功能都能在窗体中打开来实现。学主去j学生主体学生用户工作主窗体欢迎您,李明天同2修改个人信息进入选课退出系统图
5、6.2学生用户主窗体116.3 教师用户主窗体教师所有的功能都能在窗体中打开来实现。图6.3教师用户主窗体6.4 学生选课界面学生选课欢迎您!李明天同学确定返回;己星:M 第1项(共1期X | 笈衮,I数字|同E3所3目K行 之 ftp:10.136 92. . EJ 1SIOKS1749 时 管. 。Microsoft Acc.”国 cjt P fo D 11:10图6.4学生选课界面6. 4.1学生选课代码Dim xq As StringDim cname As StringDim eno As StringDim ttname As StringDim ttno As StringDim
6、 conn As New ADODB .ConnectionDim rs As New ADODB .RecordsetDim str As String12Private Sub cmd_ok_Click()Set conn = CurrentProject.Connectionttname 二 str = select教工号,课程号from 教师任课信息查询 where,str = str & ” 课程名称=& cname & and 任课学期=”& xqstr = str & and 教师姓名二& ttname &rs.Open str, connIf Not rs.EOF Thentt
7、no = rs!教工号eno=rs!课程号End IfSet rs = Nothingstr=select * from学生选课成绩表where课程号=& enostr = str & H,and 学号二& sno & rs.Open str, connIf Not rs.EOF ThenMsgBox ”你已经选学过这门课程,请选择其他课程!”ElseSet rs = Nothingrs.Open ”学生选课成绩表”,conn, adOpenKeyset, adLockOptimistic rs.AddNewrs!学号=snors!课程号=enors!任课教师=ttnors!选课学期=sqrs
8、.UpdateMsgBox ”已经成功选课!”End IfCombo_courses. Value =Combo_teacher. Value =Set rs = NothingSet conn 二 NothingEnd SubPrivate Sub Combo_courses_AfterUpdate()cnamc = Mc.Combo_courscs. Valuestr = select distinct教师姓名from教师任课信息查询where课程名称- str = str & cname & and 任课学期-n & xq &Combo_teacher.RowSourceType = n
9、Table/Queryn Combo_teacher.RowSource = strCombo_teacher. Vai ue = nn13End SubPrivate Sub Combo_teacher_AfterUpdate()ttname = Me.Combo_teacher. ValueEnd SubPrivate Sub Form_Load()If sno = nn ThenMsgBox”您还没有登录,请先登录-DoCmd.Close acForm, ”学生选课窗体”DoCmd.OpenForm ”用户登录窗体”ElseLbl_students.Caption 二欢迎您!” & sn
10、ame & ”同学”str = select distinct任课学期from教师任课表order by任课学期descnSet conn 二 CurrentProject.Connectionrs.Open str, connIf Not rs.EOF Then xq = rs!任课学期Set rs = NothingSet conn = NothingTxt_xq = xqstr = nselect distinct课程名称from教师任课信息查询”str = str & where 任课学期二& xq & Combo_courses.RowSourceType = Table/Query
11、nCombo_courses.RowSource = strCombo_courses.Value =Combo_teacher. Vai ue =End IfEnd Sub6. 5学生成绩查询界面14亘学生成绩育询施体返回姓名谯爱明学生成绩查询行.的.ftp: 10.136 92.目 15M1014S17494督0 Microtoft Access图6.5学生成绩查询界面6.6学生对教师评价界面信学生电5至海至以学生对敦坏的12字评价学生对教师授课的评价炊迎您!李明天同学下JAVA0087200眸秋M86|JSJVL05V计算机网络200浑秋VSJJG002V数据结构200弹春V87ZCYL
12、004V计算机组成原理200咨春V7司ASPCX07VAS晦序设计200浑秋V63.7JSJVL05V计算机网络200浑秋V65JIXDX001V面向对象程序被计200弹春V83CZXT003V操作系统200注春V86|_ASPCX07VAS喳序设计200注秋V98;SJKJC06V数据库基础与应用200注春V50ZCYL004V计算机组成原理2014*V80ASFCX07VAS喳序设计2014#V79SJJG002V菽据结构2014春V95SJKJC06V数据库基础与应用2014*V98,成绩课程号课程名称选课学期-T , ,;.;一:三手图6.6学生对教师评价界面6. 6.1学生对教师评价
13、的相关代码Dim str As StringDim conn As New ADODB.ConnectionDim rs As New ADODB .RecordsetDim cname As StringDim ttname As StringDim ttno As StringDim eno As StringDim xq As String15Private Sub cmd_ok_Click()IfTxt_pj.Value = m, ThenMsgBox ”请对教师进行评价!”ElseSet conn = CurrentProject.Connectionstr二 update教师任课表
14、set学生评价=学生评价+str = str & Txt_pj & * where 课程号-n & eno & and 教工号-Hstr = str & ttno & and 任课学期=n, & xq & ,nconn.Execute strMsgBox ”已经成功提交评价信息!”Set conn 二 NothingCombo_course.Value =Txt_tname.Value =”End IfEnd SubPrivate Sub Combo_course_AfterUpdate()cname = Combo_course. Valuestr = select教师姓名,任课教师,课程号
15、,选课学期from学生选课成绩信息查询 str = str & nwhere 学号=n, & sno & ,Mand 课程名称=,n & cname & ,H,Set conn = CurrentProject.Connectionrs.Open str, connIf Not rs.EOF Thenttno=rs!任课教师ttname = rs!教师姓名eno = rs!课程号xq = rs!选课学期End IfSet rs = NothingSet conn = NothingTxt_tname = ttnameEnd SubPrivate Sub Form_Load()If sno =
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 学生 成绩 查询 信息管理 系统
限制150内