Customized Msg Box for User Security

rnickels

Registered User.
Local time
Today, 13:49
Joined
Dec 8, 2006
Messages
48
Hello everyone.

Not sure if this is possible...but I hope it is!

I have created user security with limited access for specific groups to certain forms in my database.

However, when a user attempts to open one of the restricted forms a Generic Microsoft Access Message Box opens. Am I able to customise this box so that the box Heading is not "Microsoft Access" and so that the user is not offered the option of "Help"?

Really all I want is a box that says;

"You do not have the permission to open this form."

I only want an "Ok" box as an option (not the "Help" box as well)

Any help would be extremely grateful.

Thanks in advance,

Rob
 
If you used a switchboard form and intercepted the attempt to open the form, you could perform the test before Access did. In that case, you could customize the message box. It would be in a "OnClick" code for a button on the switchboard form before you actually open the impled form.

The moment you actually try to open the form, that's it. You have lost the ability to give a customized message box.

If you let the users see the real Forms window, you have already lost the ability to do the interception.

Now if you REALLY wanted to do it right, build the switchboard form in a way that it always obscures the Access window. Then, when you display the form, grey-out the buttons for the forms the user cannot reach and that way prevent the need for ANY error message. If the switchboard is always maximized and has neither CLOSE or MINIMIZE controls, for example, there would be no way to leave that form except through buttons you provide on the switchboard itself. You would never see what was behind it.

Of course, you have to have a button or other startup function such that if it is the DBA (you), the switchboard DOES have a "close without exiting" button.
 
Follow up question

Hello,

I thought of a possible way to solve the problem of the annoying msg box that appears when a user tries to open a form when the administrator has not granted permission.

Could I use VB code to say something like:

If CurrentUser = (available usernames that do have permissions) Then
DoCmd.OpenForm "Client Information Main Info Form", acNormal
Exit Sub
End If
MsgBox "You do not have permission to open this form!", vbOK, "Tennis Center Business Manager 2007"

Do you forsee this as a solution?

Thanks for your input!

Rob




The_Doc_Man said:
If you used a switchboard form and intercepted the attempt to open the form, you could perform the test before Access did. In that case, you could customize the message box. It would be in a "OnClick" code for a button on the switchboard form before you actually open the impled form.

The moment you actually try to open the form, that's it. You have lost the ability to give a customized message box.

If you let the users see the real Forms window, you have already lost the ability to do the interception.

Now if you REALLY wanted to do it right, build the switchboard form in a way that it always obscures the Access window. Then, when you display the form, grey-out the buttons for the forms the user cannot reach and that way prevent the need for ANY error message. If the switchboard is always maximized and has neither CLOSE or MINIMIZE controls, for example, there would be no way to leave that form except through buttons you provide on the switchboard itself. You would never see what was behind it.

Of course, you have to have a button or other startup function such that if it is the DBA (you), the switchboard DOES have a "close without exiting" button.
 

Users who are viewing this thread

Back
Top Bottom