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

Restricting what my user can see, howto?

P: n/a
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I think this is likely to take a little VB -- I can't imagine a
fully-developed application being done without a good deal of VB. And a
fully-developed application is the only kind that can be both secured and
even a little user-friendly.

I assume that you have set proper permissions for the different groups to
view/use those forms. I also assume you open the forms with a
DoCmd.OpenForm. Put a check for the user's group before you execute the
DoCmd.OpenForm. To make it even more user friendly, you could check the
group and not even display the Command Button or other Control the user
clicks to Open the Form / Report, whatever.

Larry Linson
Microsoft Access MVP
"John Marble" <fr******@gmail.com> wrote in message
news:28**************************@posting.google.c om...
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).

Nov 13 '05 #2

P: n/a
Do you know about hiding the database window? If not, look at tools -
startup. There you can tell the program not to display the database window
at startup. You can also designate a form that will open when it starts. If
you select "Use Access Special Keys" then you and the users can hit F11 to
make the database window appear.

"John Marble" <fr******@gmail.com> wrote in message
news:28**************************@posting.google.c om...
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).

Nov 13 '05 #3

P: n/a
On Fri, 08 Jul 2005 17:57:56 GMT, "Larry Linson"
<bo*****@localhost.not> wrote:

<snip>
I assume that you have set proper permissions for the different groups to
view/use those forms. I also assume you open the forms with a
DoCmd.OpenForm. Put a check for the user's group before you execute the
DoCmd.OpenForm. To make it even more user friendly, you could check the
group and not even display the Command Button or other Control the user
clicks to Open the Form / Report, whatever.

Larry Linson
Microsoft Access MVP

bouncer?

As I recall, to check what group the user is in you have to be in a
higher security group, which meant giving the user a fuller version
of the MDW file than necessary, and creating a workspace using the
username and password of an admin user which had therefore to be
embedded in the code. Admittedly you could make the code invisible to
users, but ...
Or maybe I was too lazy to write code which checked each group in turn
from users upwards.
David

Nov 13 '05 #4

P: n/a
Bri

John Marble wrote:
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).


In the Form that you use for Startup, make a call to this Function
(which you should put in a Module)

--
Bri

-------------
If UserInGroup("USERS") Then
Me!UsersFormButton.Visible = True
End If
If UserInGroup("RESP") Then
Me!RESPFormButton.Visible = True
End If
-------------
Function UserInGroup(stGroup As String) As Boolean
Dim grp As DAO.Group
Dim grps As DAO.Groups

UserInGroup = False

Set grps = DBEngine(0).Users(CurrentUser()).Groups

For Each grp In grps
If StrComp(grp.Name, stGroup, vbBinaryCompare) = 0 Then
Exit For
End If
Set grp = Nothing
Next grp

If Not (grp Is Nothing) Then
UserInGroup = True
End If
Set grp = Nothing
Set grps = Nothing
End Function

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.