By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

Disable control based on group secutiry level in MS Access

P: n/a
Hello to all,

As you can read the subject of this post, this is exactly what I'm
trying to do. I need to disable some controls in my form base on
secutiry level in MS Access; I've been searching all over for a
solution to this problem but unfortunatelly so far I've been unable to
obtain any good results for this problem.

PS: Is this possible after all?

Thanks
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 18 Sep 2004 15:07:24 -0700, fa*********@gmail.com (Joscarfas)
wrote:

In the Form_Open event of the form, write:
MyControl.Enabled = (IsUserMemberOfGroup(CurrentUser, "SomeGroup"))

This function could be in some module:
Function IsUserMemberOfGroup(ByVal strUser As String, ByVal strGroup
As String) As Boolean
dim varDummy as Variant
on error resume next
varDummy=DBEngine.Workspaces(0).Users(strUser).Gro ups(strGroup).Name
IsUserMemberOfGroup = (Err.Number=0)
End Function

-Tom.

Hello to all,

As you can read the subject of this post, this is exactly what I'm
trying to do. I need to disable some controls in my form base on
secutiry level in MS Access; I've been searching all over for a
solution to this problem but unfortunatelly so far I've been unable to
obtain any good results for this problem.

PS: Is this possible after all?

Thanks


Nov 13 '05 #2

P: n/a
Tom - thanks for your suggestion; is it possible that you can guide me
on how to do this since I'm not too familiar with any type of coding.
Thanks

Tom van Stiphout <no*************@cox.net> wrote in message news:<i6********************************@4ax.com>. ..
On 18 Sep 2004 15:07:24 -0700, fa*********@gmail.com (Joscarfas)
wrote:

In the Form_Open event of the form, write:
MyControl.Enabled = (IsUserMemberOfGroup(CurrentUser, "SomeGroup"))

This function could be in some module:
Function IsUserMemberOfGroup(ByVal strUser As String, ByVal strGroup
As String) As Boolean
dim varDummy as Variant
on error resume next
varDummy=DBEngine.Workspaces(0).Users(strUser).Gro ups(strGroup).Name
IsUserMemberOfGroup = (Err.Number=0)
End Function

-Tom.

Hello to all,

As you can read the subject of this post, this is exactly what I'm
trying to do. I need to disable some controls in my form base on
secutiry level in MS Access; I've been searching all over for a
solution to this problem but unfortunatelly so far I've been unable to
obtain any good results for this problem.

PS: Is this possible after all?

Thanks

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.