Inhibit navigation pane (1 Viewer)

gguy

Registered User.
Local time
Today, 04:12
Joined
Jun 27, 2002
Messages
104
I have a database with security setup and either by user or by group I would like to inhibit the navigation pane.

Like, for anyone in the Admins group I would like the the navigation pane to be available but for anyone in the read only group I would like the navigation pane to be inhibited.

I am familar with the DoCmd.RunCommand acCmdWindowHide command but I am having a hard time using it with a specific user or group.

Thanks in advance for any help. GG
 

gguy

Registered User.
Local time
Today, 04:12
Joined
Jun 27, 2002
Messages
104
No one willing to help me out on this one or did I not ask my question clearly enough?

Maybe I should have put this in the forms forum because the code will be run from the On Load event of the form that is loaded when the database is opened.

I can get the DoCmd to work correctly but I want it to work for all database users that have "read only" rights. I do not want it to work for users that have "admins" rights.

If there is not a way to run this DoCmd by group then hopefully I do this by user.

Any help would be greatly appreciated.
 

David R

I know a few things...
Local time
Yesterday, 22:12
Joined
Oct 23, 2001
Messages
2,633
Sorry for the late response...

You should be able to query your security table and find out if the user is in the Admins group or not. Then Exit Sub/GoTo/IF to avoid the hide code.
 

gguy

Registered User.
Local time
Today, 04:12
Joined
Jun 27, 2002
Messages
104
The problem is that we are still using Office 2007. I guess this functionality was not kept in Office 2010.

In Access 2007 you can create users and groups and there is no security table that I can see. Correct me if I am wrong.

I think I am just going to have to rewrite that portion because we are finally upgrading our office packages.

I will have to think out the user and group security structure. Any help with the structure or pointing to some code would be appreciated. GG
 

David R

I know a few things...
Local time
Yesterday, 22:12
Joined
Oct 23, 2001
Messages
2,633
I've never used the built-in security, and I believe you're right that they did away with it in some recent version.

What I actually use is fOSUserName() (a common public function you can Google for) to get their Windows login, then have a lookup table which relates that id to a security level ([E]mployee, Supervisor, [C]odemonkey, etc). Then you can call that table to look up some rudimentary security, and stop code from running if they're in the wrong group.
 

gguy

Registered User.
Local time
Today, 04:12
Joined
Jun 27, 2002
Messages
104
Hey, just wanted to say thanks for the help.

This modification is not real important to the function of this database but it would simplify the database for our management staff that may only get into the database once or twice a year.

I would like to send a copy to you to critique if you would be willing. Let me know if this will work for you or not. Thanks again, Greg
 

David R

I know a few things...
Local time
Yesterday, 22:12
Joined
Oct 23, 2001
Messages
2,633
Sorry, I'm only intermittently around on the forums and my time to critique my own databases is limited these days...

However if you start a new thread I'll bet you get some takers. Good luck!
 

Users who are viewing this thread

Top Bottom