设计教务质量管理系统遇瓶颈 急需高人指点 非常感谢
毕设做的是教务质量管理系统,数据库用的SQL,数据库已经建立好并连接,但运行的时候总是出现[Microsoft][ODBC][SQL Server Driver]][SQL Server]对象名‘权限清单’无效,但建好的数据库表里有权限清单,导师在催交论文,急需请高人指点Private Sub MDIForm_Load()
Dim db As New DataBases
Dim rs As Recordset
'根据当前登陆用户从数据库查询他的权限
Set rs = db.RunSelectSQL("SELECT 权限名称 FROM 权限清单 WHERE 用户编号='" + UserId + "'")
If Trim(UserId) = "1" Then
mnClass.Enabled = True
mnStudent.Enabled = True
mnSubject.Enabled = True
mnSelect.Enabled = True
mnCourse.Enabled = True
mnResult.Enabled = True
mnReport.Enabled = True
Else
mnClass.Enabled = False
mnStudent.Enabled = False
mnSubject.Enabled = False
mnSelect.Enabled = False
mnCourse.Enabled = False
mnResult.Enabled = False
mnReport.Enabled = False
'根据当前登陆用户权限设置菜单项是否可用
While Not rs.EOF
Select Case Trim(rs("权限名称"))
Case "班级信息维护"
mnClass.Enabled = True
Case "学生信息维护"
mnStudent.Enabled = True
Case "课程信息维护"
mnSubject.Enabled = True
Case "学生选课"
mnSelect.Enabled = True
Case "课程查询"
mnCourse.Enabled = True
Case "成绩输入"
mnResult.Enabled = True
Case "查询成绩单"
mnReport.Enabled = True
End Select
rs.MoveNext
Wend
End If
End Sub