标题:[求助]修改用户权限的操作失败了.
取消只看楼主
lan9203
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2006-10-22
 问题点数:0 回复次数:0 
[求助]修改用户权限的操作失败了.

权限修改代码:

Option Explicit
Private moUserTable As Recordset
Private superno As String

Private Sub Command1_Click()
If username = DataCombo1.Text Then
MsgBox "不可以修改自身的权限", , "操作失败"
Exit Sub
End If

If DataCombo1.Text = "" Then
MsgBox "用户名不能为空", vbOKOnly, "操作失败"
Exit Sub
End If

If superadmin = "否" Then
MsgBox "您不是超级管理员无法执行本操作", , "操作失败"
Exit Sub
End If

With moUserTable


.Find "用户帐号 = '" & DataCombo1.Text & "'"
If .EOF Then

.Fields("超级用户") = superno
.Update
MsgBox "权限修改成功", vbOKOnly, "修改权限"
usermanage.Adodc1.Refresh
Else
MsgBox "权限修改失败", vbOKOnly, "操作失败"
End If

End With

End Sub

Private Sub command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
InitializeDataPath
Adodc1.ConnectionString = AdodcPath

Adodc1.RecordSource = "select * from usertable"
Adodc1.Refresh
Set moUserTable = Adodc1.Recordset
Option2.Value = True

Set DataCombo1.RowSource = Adodc1

DataCombo1.ListField = "用户帐号"

End Sub

Private Sub Option2_Click()
superno = "否"
End Sub

Private Sub Option3_Click()
superno = "是"
End Sub



帮忙看看是哪个地主出错了,就是改不了啊.

搜索更多相关主题的帖子: 权限 用户 失败 
2006-11-06 01:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-100973-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.147784 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved