G
Guest
Hallo
I would like to find out when i click on exit button of my access db to find
out if the user that's logged is in the admin group if yes then run some
queries if not in the admin group then exit how is this possible
I have asked this question before and the answer I got it look at the FAQ on
security since im not a VB expert it did not really help me the code i found
there which should give me what i want is this but i dont know where to put
it and how to use it from there, it would be very help full if some one can
just tell me how to get a hidden text box just to say admin if the user is
admin and if not just to say user the rest i can do. By my self
Thank you
Markus
Function faq_IsUserIngroup(strGroup As String, strUser As String) As Integer
' Return True if User is in Group, False otherwise
' This only workis if you're a member of the Admin group.
Dim ws As WorkSpace
Dim grp As GroupLevel
Dim strUsername As String
Set ws = DBEngine.Workspaces(0)
Set grp = ws.groups(strGroup)
On Error Resume Next
strUsername = ws.groups(strGroup).users(strUser).Name
faq_IsUserIngroup = (Err = 0)
End Function
I would like to find out when i click on exit button of my access db to find
out if the user that's logged is in the admin group if yes then run some
queries if not in the admin group then exit how is this possible
I have asked this question before and the answer I got it look at the FAQ on
security since im not a VB expert it did not really help me the code i found
there which should give me what i want is this but i dont know where to put
it and how to use it from there, it would be very help full if some one can
just tell me how to get a hidden text box just to say admin if the user is
admin and if not just to say user the rest i can do. By my self
Thank you
Markus
Function faq_IsUserIngroup(strGroup As String, strUser As String) As Integer
' Return True if User is in Group, False otherwise
' This only workis if you're a member of the Admin group.
Dim ws As WorkSpace
Dim grp As GroupLevel
Dim strUsername As String
Set ws = DBEngine.Workspaces(0)
Set grp = ws.groups(strGroup)
On Error Resume Next
strUsername = ws.groups(strGroup).users(strUser).Name
faq_IsUserIngroup = (Err = 0)
End Function