遇到了一点问题,不知那位仁兄可以帮忙看一下 谢谢先!
问题出现在以下代码 光标出现在红色地方
Private Sub Form_Load()
Dim rst As ADODB.Recordset
Dim rights As String
Dim sTokens() As String
Dim msg As String
'查找权限
SQL = "select 权限 from 用户信息表 where 用户ID='" & UserId & " ' "
Set rst = SelectSQL(SQL, msg)
If rst.RecordCount > 0 Then
rights = Trim(rst.Fields(0))
rst.Close
Else
MsgBox ("没有用户信息!")
Exit Sub
End If
'设置权限
机构设置.Enabled = InStr(rights, "机构设置")
学籍管理.Enabled = InStr(rights, "学籍管理")
课程管理.Enabled = InStr(rights, "课程管理")
成绩管理.Enabled = InStr(rights, "成绩管理")
奖惩管理.Enabled = InStr(rights, "奖惩管理")
系统管理.Enabled = InStr(rights, "系统管理")
End Sub