Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Level Security and buttons?

Status
Not open for further replies.

cashe

Technical User
May 4, 2002
60
GB
Hi All,

A security question has arisen again!!

I have just set up security levels on a distributed Access 2k db. The security stuff is all quite new to me but things are going well so far. However I have a report form where the users can select a variety of reports. The reports open in preview mode from a command button. Some reports should not be opened by certain User Level Groups. For example:

Full Data Users can not open the management reports. If a full Data User trys to open a management report I get the error message "You do not have permission for this report" and then it gives the user the option to "End" or "Debug" which is not very friendly. Therefore the user level permissions are working but how do I make the error message more friendly? what I would like to do is if the management report button is selected by a user group that does not have permission a message appears with "Sorry. You do not have permission to open this report. + vbOKonly" OR hide the management report button to Full Data Users.

How do I do this and what VB is needed?

Thanks

Cashe ;-)
 
Cashe,

What I would do is put code in the Open event of the form to make invisible any buttons that open reports or forms for which the user does not have permission.

There's code either in the Access Security FAQ or on the MS web site that will show you how to tell if the user is a member of a particular group.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top