I have been searching for this solution all afternoon and have gotten nowhere. I am running Access 2010. I have added the following to the "On Open" event on my main form:
My main form (frmMain) is displayed when the database opens. As you can see, I am hiding the ribbon and the navigation pane from users. I also want to prevent users from right clicking on the form and opening it in Design view - trying to prevent any monkey business. However, the line:
Me.ShortcutMenu = False
is not preventing users from right clicking on the form and getting the shortcut menu and going into Design view.
If I go to Options and uncheck: "Allow Default Shortcut Menus" then I lose the ability to print reports because I have the ribbon hidden and this will not allow right click on reports.
Converting to .accde is not an option at this time. Does anyone have any suggestions?
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
Me.ShortcutMenu = False
End Sub
My main form (frmMain) is displayed when the database opens. As you can see, I am hiding the ribbon and the navigation pane from users. I also want to prevent users from right clicking on the form and opening it in Design view - trying to prevent any monkey business. However, the line:
Me.ShortcutMenu = False
is not preventing users from right clicking on the form and getting the shortcut menu and going into Design view.
If I go to Options and uncheck: "Allow Default Shortcut Menus" then I lose the ability to print reports because I have the ribbon hidden and this will not allow right click on reports.
Converting to .accde is not an option at this time. Does anyone have any suggestions?