Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21096

[RESOLVED] user permissions when login doesn't get limited suddenly

$
0
0
i have a form where i create users to login to the system
only the administrator or what ever username i create first can see and has full access.
this code work until now
dont know what happend i didnt changed nothing suddenly every user has full access to the system which is wrong.
this is the code that i used
Code:

  Private Sub MDIForm_Activate()
       
    Set rs = CN.Execute("SELECT UserName FROM Users WHERE UserID=1")
    MDImain.staff.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.config.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.outside.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.diary.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.printusers.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.cleanreport.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.printdiary.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.manag.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.printdiary.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.graph.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.fallow.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.salesgraph.Enabled = IIf(rs!UserName = UsLogin, True, False)
    MDImain.invgraph.Enabled = IIf(rs!UserName = UsLogin, True, False)
End Sub

if any other information is needed i will add
regards salsa31

Viewing all articles
Browse latest Browse all 21096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>