Security freezes database

Nej

New member
Local time
Today, 10:02
Joined
Jul 15, 2002
Messages
8
Hello. I am new to using Access so bare with me :)

I am working on a project for work that has me testing Access's built in security features. I used the Security Wizard to create groups and users. My problem came when I set up group permissions.

I want Access to display a message box letting users know they don't have permission to perform the function (in my case running a query) when they press a button on the switchboard. Note: I created the switchboard using Switchboard Manager.

I went into the VBA code for the switchboard in the Private Function HandleButtonClick(intBtn As Integer) section and modified the error message. The message box seems to work and even displays the message I wrote, until the user clicks on a button they don't have rights to more than 3 times. When a button or mutiple buttons are pushed in the switchboard that the user doens't have rights to it locks up the database and only lets them exit by clicking on the X at the top of the screen.

This is the code:

HandleButtonClick_Err:
' If the action was cancelled by the user for
' some reason, don't display an error message.
' Instead, resume on the next line.
If (Err = conErrDoCmdCancelled) Then
Resume Next
Else
MsgBox "You don't have rights to perform that function.", vbCritical
Resume HandleButtonClick_Exit
End If

Does anyone know a better way to handle this?

Thank you!
 
Nej,

We had several problems with access built in security. The ability to use groups other then on object security for one. So we built our own which works suprisingly well. The tables arent secured by it though we use our SQL server to do that. My suggestion would be to build your own security all together. It is time consuming but in our case it was well worth the effort. We added features like an ingroup function etc... If you need help or suggestions please let me know.
 

Users who are viewing this thread

Back
Top Bottom