Results 1 to 10 of 10
  1. #1
    Benlav is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    6

    How to: enable right click after centrally disabling it

    Hi all. Long time peruser first time user. I've made quite a cool little functioning database if I don't say so myself. I've managed to youtube or view forums to answer all my questions. However one eludes me...

    My front end and back end is suitably locked down. The information in my tables is sensitive data so everything is driven by user forms. As I've disabled the right click function in the options menu (then removed ribbons and menus so it wont be reversed), i come unstuck when i want users to print or save reports which i generate as print preview.



    So... is there a simple code i can plug in to enable right click for the reports? Or somewhere in the mess of the property options in the report view, is there a right click enable over ride option?

    I thought about having a button on the report but i figure just enabling the right click would be easier.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I presume you can still build your own right click menus (called shortcut menus) to display just the options you want which will still run if you have disabled shortcuts - see this link for an example

    https://msdn.microsoft.com/en-us/lib.../ff194247.aspx

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    That is what I use for the shortcut menu. The trick to using VBA is you need to know the policy ID's of the various menu items. The following post has some code how to interrogate Access and retrieve the policy ID's.
    https://www.accessforums.net/showthr...913#post279913

    I started that thread because of an issue with Access 2013 where custom shortcut menu's would disappear after closing and reopening the app. This issue was addressed in a Microsoft Office update and you only need to create the custom shortcut menus once.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    This is a list of all of them
    Attached Files Attached Files

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for the list Ajax!

  6. #6
    Benlav is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    6
    awesome, thanks all, I'll give it a crack now.

    edit: no luck so far, I need the office 14 object library. My system allows me to select office 15 but there is no dll file. I might need to have a chat to the IT guys.

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Why do you believe there is a dll file missing? When creating a reference via the References Window, you will want to select the version of Office that is available to you. 15.0 is for Office 2013 and 14.0 is for Office 2010.

    If you wish to distribute your application to users that have Office 2010, you can remove the reference to Office 15 and the VBA code prior to distribution. The menus will remain with the app.

    Alternatively, you can create a standalone application to create shortcut menus. Then, you can use the Import Wizard to Import the Custom Shortcut Menus from your standalone app to the applications you wish to distribute. Simply, choose the advanced options within the Wiazard.

  8. #8
    Benlav is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    6
    Quote Originally Posted by ItsMe View Post
    Why do you believe there is a dll file missing? When creating a reference via the References Window, you will want to select the version of Office that is available to you. 15.0 is for Office 2013 and 14.0 is for Office 2010.

    If you wish to distribute your application to users that have Office 2010, you can remove the reference to Office 15 and the VBA code prior to distribution. The menus will remain with the app.

    Alternatively, you can create a standalone application to create shortcut menus. Then, you can use the Import Wizard to Import the Custom Shortcut Menus from your standalone app to the applications you wish to distribute. Simply, choose the advanced options within the Wiazard.

    Well the office.commandbar or application.commandbar isn't a valid option in the office I am using, 2010. I wasn't aware that the 14/15 versions were for the specific years of the programme, which explains why I don't have it. But it appears that in the version I am using, I can't use the commandbar code as it is not recognised.

    So I ended up just creating a button to save the pdf which did the trick. Still open to suggestions how to do it the way I am after though...

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Hmm, not sure what to say about that. I was looking at some examples that I have previously uploaded to this forum and found the following. Maybe you can reverse engineer it. I believe it is using 2013 reference. So you will have to remove the missing reference and replace it with the correct version/year.
    Attached Files Attached Files

  10. #10
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    Not clear what the problem is - I sent you a link which happened to be for access 2013 and later. At the top, you can select for earlier versions - exactly the same code but for office 14.0 library - other than the references in the text I don't know why ms don't just have the one page and say 'from 2010 and later'. Here is the link for 2010.

    https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

    With regards references, are you saying you don't have Office 14 in your references to select? You need to add it to access the office functionality

    I note you are using 64bit Access - I presume the rest of your office apps are the same, otherwise it might not be in the same location - 64bit stuff is generally stored in C:\Program Files\Common Files\microsoft shared\OFFICE14 and 32bit stuff in C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Disabling "Click to Add"
    By tgall in forum Access
    Replies: 2
    Last Post: 02-02-2016, 07:12 AM
  2. disabling fields
    By Compufreak in forum Access
    Replies: 8
    Last Post: 12-14-2012, 12:28 AM
  3. Disabling Fields
    By dolovenature in forum Programming
    Replies: 2
    Last Post: 09-16-2012, 07:45 PM
  4. Disabling fields
    By bursteffect in forum Access
    Replies: 1
    Last Post: 08-30-2012, 12:54 PM
  5. Disabling a control
    By NOTLguy in forum Forms
    Replies: 5
    Last Post: 10-31-2010, 11:34 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums