You should consider locking down the interface so that users don't/can't get
to things they have no permission for.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13079
As a minimum, you shouldn't allow users to access the tables directly.
You would create the necessary forms/reports and allow user interaction only
through those.
Create custom menus/toolbars for use throughout your application.
Create a startup form (a main menu form if you have one) that is opened on
startup.
You can hide buttons based on the groups a user is a member of. So if you
have a button to open some form, only show it to users who have permission
to open that form; that way they won't get the 'no permissions' message.
There is code in the security FAQ you can use to determine if a user is a
member of a certain group.
http://support.microsoft.com/?id=207793
Use the features in Tools, Startup to
set the startup form
set your default menu (the custom one you made)
disable all the checkboxes about allowing built in menus, toolbars,
changes etc.
hide the db window (ensure the custom menu you create does not
include the Windows, Unhide item)
Uncheck the allow special keys (this will disable the F11 key, among
others)
If you need to bypass these startup features, you can hold the shift key
down while you open the db. If you feel that your users may use this to
bypass your settings, you can disable the shift key bypass - there's an
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13079
example in help for doing this(look for AllowBypassKey) or at
http://www.mvps.org/access/modules/mdl0011.htm
and
http://www.mvps.org/access/general/gen0040.htm
You can also create a MDE from your database, which will prevent changes to
forms, reports and modules (If you do this, be certain to keep your original
mdb in case you need to make changes).
--
Joan Wild
Microsoft Access MVP
Secret Squirrel wrote:
> Chris,
> Thanks for the input. The error code changes depending on if it's a
> form, table, query, report, etc. Is there any way to just create a
> system wide module to change this box? Otherwise I would have to put
> this on every form & report. And I would have no way to put this on
> the queries and tables.
>
> "Chris" wrote:
>
>> Does the error message that is displayed also show the error number?
>> If so, in your forms onload event add a select case statement to your
>> error handler along the lines of:
>>
>> Select Case Err.Number
>> Case 12345 'dummy number - incorrect permissions
>> msgbox "You currently do not have access to this option."
>> & _ vbcrlf & vbcrlf & _
>> "To change permissions, contact your system
>> administrator", _
>>
>> vbokonly+vbinformation, "Permissions Error"
>> Resume Exit_onLoad
>> Case Else 'catch all other errors
>> msgbox err.number & " - " err.description
>> resume Exit_onLoad
>> End Select
>>
>> If you need further help on this, you can send me through a copy of
>> your database (zipped and all personal data removed) and I'll look
>> into it for you.
>>
>> Kind regards
>>
>> Chris
>>
>> Secret Squirrel wrote:
>>
>>> I have a secure db with secutiry permission but would like to know
>>> if it's possible to change the message box that appears when a user
>>> tries to open a form/menu option that he/she doesn't have access
>>> to. Right now a default message appears telling them that they
>>> don't have permissions to open to the form but it gives them the
>>> option to "End" or "Debug". When they click "Debug" it opens the VB
>>> window. Anyway around this message so users can't access this
>>> window?