D
dan.cawthorne
How do change the error message thats prompted when a User opens a
form that they don't have permission to open
instead of the standard end and debug buttons on the menu with the
error run time error 2603 been displayed
i just want a simple message box that with a OK button on it.
ive tried putting some code on the on error event of the form, from
another article but not luck.
i tried following.
Private Sub Form_Error(DataErr As Integer, Response As Integer)
On Error GoTo Errorfnc_mnuOpen_Err
Errorfnc_mnuOpen_Err:
If Err = 2603 Then
If MsgBox("You do not have the necessary permissions to_ view
this menu option. Consult your system administrator") = vbOK Then
'simply end the function
End If
Exit Function ' if it's a sub then Exit Sub
End If
End Sub
This code dose not have any effect.
My form im opening from via command button is MainMenu and the Command
Button opens a form called "Admin_Menu"
or my route was when users if a certain group, logged in would not be
able to see the button that opens the "Admin_Menu"
So on the Mainmenu Open Eevent I tried
If faq_IsUserInGroup("Users",CurrentUser) then
Me.Command08.Visible = False
Else
Me.Command08.Visible = True
End If
But This Don't work either
form that they don't have permission to open
instead of the standard end and debug buttons on the menu with the
error run time error 2603 been displayed
i just want a simple message box that with a OK button on it.
ive tried putting some code on the on error event of the form, from
another article but not luck.
i tried following.
Private Sub Form_Error(DataErr As Integer, Response As Integer)
On Error GoTo Errorfnc_mnuOpen_Err
Errorfnc_mnuOpen_Err:
If Err = 2603 Then
If MsgBox("You do not have the necessary permissions to_ view
this menu option. Consult your system administrator") = vbOK Then
'simply end the function
End If
Exit Function ' if it's a sub then Exit Sub
End If
End Sub
This code dose not have any effect.
My form im opening from via command button is MainMenu and the Command
Button opens a form called "Admin_Menu"
or my route was when users if a certain group, logged in would not be
able to see the button that opens the "Admin_Menu"
So on the Mainmenu Open Eevent I tried
If faq_IsUserInGroup("Users",CurrentUser) then
Me.Command08.Visible = False
Else
Me.Command08.Visible = True
End If
But This Don't work either