Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2011
    Posts
    42

    Unanswered: creating shortcut menu

    I'm busy nowadays with a project which will make me posting many topics.

    Now, I'd like to create a shortcut menu within reports to execute particular events.

    can anyone illustrate it. I've followed Microsoft instructions in this regard but didn't work

    thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    There are several methods to create a menu (contextual or not) in Access. Which one did you use, what happened and what went wrong?
    Have a nice day!

  3. #3
    Join Date
    Mar 2011
    Posts
    42
    you know when you right click on any report, some shortcut menu appears, there's some way to create a customized one and then accommodate it in the report properties.
    Microsoft has published the macro way to do it (using two macros) one will contain the commands and the other will refer to the shortcut menu.
    --- thanks ----

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    If the method you're talking about is the one that's exposed here: Create custom menus and shortcut menus by using macros - Access - Microsoft Office I've tested it step by step and it works. Can you check to see if you did not miss something?
    Have a nice day!

  5. #5
    Join Date
    Mar 2011
    Posts
    42
    this is typically what I've done, but :
    1- in the property sheet and against the option shortcut menu bar nothing is appearing
    2- I tried to type it manually but on right clicking on the form it show the message "microsoft access can't find the object (macro for shortcut menu)

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Here's another link about the same topic but basically it describe the same creation process: Setting Up Right Click Menus for Access 2007 — DatabaseJournal.com

    Another solution would consist in creating custom menus using VBA, but depending on your programming skills this can be a complex task.
    Have a nice day!

  7. #7
    Join Date
    Mar 2011
    Posts
    42
    thanks a lot
    I appriciate

  8. #8
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

  9. #9
    Join Date
    Mar 2011
    Posts
    42
    Sinndho, is it possible to use a vb code before opening a report to assign a shortcut menu to this particular report like :
    if ...... then
    reports!ReportName.shortcutmenu bar="submenu1"

    -------
    thanks in advance

  10. #10
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Yes you can, here's how:
    Code:
    Function AddShortcutMenu()
    
        Dim rpt As Access.Report
        
        Application.DoCmd.OpenReport "Report1", acViewPreview, , , acHidden
        Set rpt = Application.Reports("Report1")
        rpt.ShortcutMenuBar = "Custom 1"
        rpt.Visible = True
        Set rpt = Nothing
        
    End Function
    Have a nice day!

  11. #11
    Join Date
    Mar 2011
    Posts
    42
    - Thaaaaaaaaaaaaaaaaaaaaanks

  12. #12
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •