Shortcut Menu Bar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mshakeelattari
    New Member
    • Nov 2014
    • 100

    Shortcut Menu Bar

    Hi
    .
    I came accross a database file having a shortcut menu bar. I imported the shortcut menu bar into my another database file. Where is this shortcut menu bar present in my new database file?
    Thanking in anticipation.

    .
    I came across a database file in .mdb format. This contains a form, in the shortcut menu property of which, there is "agrShortcu t" that is displayed on the right click in the form. Further the database also contains a tools bar in the Add-Ins Tab. I was able only to import this Menu to my database. But was unable to Edit/Change or Delete the Shortcut menu or the Tools bar from the database. I am using MS Access 2016. The file named "Zoom.zip" is located at the http://www.msaccesstips.com/download...-incontrol.php link for Download.

    Can anybody help me change the menu or create like that myself? The database contains no such module/vba coding or any macro related to this menu. Thanking in anticipation. Urgent help needed...
    Last edited by zmbd; Jun 12 '16, 11:14 PM. Reason: [z{this is basically the same question, you have the answer - please do not double post.}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    need a bit more details...

    Comment

    • mshakeelattari
      New Member
      • Nov 2014
      • 100

      #3
      What kind of information may be needed please?

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        + Version of Office/Access being used in both cases
        + OS
        + What type of shortcut-menu, was it attached to form, the database, right-click, etc...
        + Do you know the name of the menu?
        + Is there any underlying macro or vba script associated with the menu - don't need the code, just if it exists or not?

        Comment

        • mshakeelattari
          New Member
          • Nov 2014
          • 100

          #5
          + MS Access 2013/2016
          + MS Windows 7/10
          + In the form's 'Shortcut menu bar' property, just type the name of the shortcut menu bar as AgrShortcut to apply the shortcut menu bar on mouse right click to the specific form.
          + The name is "AgrShortCu t"
          + I tried my best but found no underlying macro or vba script associated with the menu. In the VBA windows I used the Find command in the CurrentProject to find the name but found no such a word.
          + Under the Access's Add-ins tab, a toolbar is visible with the name of AgrMainToolBar.

          Comment

          • mshakeelattari
            New Member
            • Nov 2014
            • 100

            #6
            Can I send the mdb access file?

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #7
              [2016-06-09:56UTC::updat e added a few links]
              We typically do not need the data file.

              If you are trying to import one of the older style custom menus (mdb files are the older format) in to ACC2013/2016; you may be out of luck as a stand alone tab and/or pop-up as in ACC2003; however, it should be in the "Add-Ins" ribbon tab as you've already discovered, and it does appear that you should be able to add a custom ribbon tab:

              Discontinued features and modified functionality in Access 2013 (read more...)

              Access 2003 toolbar and menus

              You can no longer bypass the Ribbon interface and show Access 2003 toolbars and menus in Access 2013 as you could in 2007 and Access 2010. But you can make them appear on the Add-ins tab, or add them to a custom Ribbon group or the Quick Access Toolbar.

              Access 2003 Toolbars and menus are shown in the Add-ins tab on the Ribbon. Adding them to a custom Ribbon group is also supported. You can also use RibbonX and XML to create a custom ribbon for your desktop database.
              IMHO, as the versions of office advance, the older style shortcut menus are going to be harder to use... instead you'll eventually have to use the ribbon and context based groups. Unfortunately there's not a lot of information about creating and using Ribbons.

              > Simple introduction to the ribbon
              Customize the Word Ribbon User Interface
              The example here covers Word. The concept for writing the XML for the ribbon is very much the same for Word as in Access; however, in Access the ribbon is quite often built within the Database using a usysribbons table.... so...

              > A little more detail:
              Access 2007 Ribbon Website * Access 2010 Ribbon Website * Home of Ribbon Creator

              A caution here, this site has its own ribbon creation tool that it sales, AFIK, Bytes.com is neutral about this tool as am I. I include the link to this site because it has one of the best set of reference materials for the Ribbon interface I've ran across since OFFICE2007 introduced the concept - as a matter of fact, if not in part for this site's reference materials, I would never have been able to develop my first Ribbon for Excel when Office2010 first rolled out and broke our custom workbook add-in menus! Mind you, I created that ribbon without their tool. (the tool I did use for Excel is the Custom UI Editor for Microsoft Office - it might still be available; however, any decent XML editor will allow you do the same too and you should be able to add the ribbon schema for the editor to use for validation: Office 2010 Reference: Office Fluent User Interface XML Schema - the Excel files take a little extra work to get the ribbon into, Access is much simpler IMHO).

              >>> Take note, an update to the above link, Since Acc2010 it is possible to LATE BIND the ribbon call back; thus, one no longer has to ensure that the interface library (Microsoft Office 1(2|4).0 Object Library) is properly referenced if late binding is implemented. I tend to early bind the ribbon during development and then switch over to late binding once everything is working.

              >> This is part one of MS's site Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3) AFIK, 2007 ribbon references are still valid in 2010+; however, that may not hold true in the future
              Last edited by zmbd; Jun 10 '16, 12:42 AM. Reason: [z{updated links}]

              Comment

              • mshakeelattari
                New Member
                • Nov 2014
                • 100

                #8
                Very much thankful to you for this information. The custom menu that I imported into my own accdb file exists under the Add-ins tab. Further, it contains different set of tools/icons than the shortcut menu displayed on right-click on the form, that contains a few options of the Toolsbar present under the Add-ins tab. Now the question is that, how can I remove the toolsbar from the Add-ins menu (and my project/accdb file). Also, can I change the items list in the shortcut menu being displayed on right click in the form?
                Waiting for an urgent reply... Thank you an advance.

                Comment

                • zmbd
                  Recognized Expert Moderator Expert
                  • Mar 2012
                  • 5501

                  #9
                  At this point your original question has been answered so if we need to go in to more detail on the following please start a new thread.

                  To remove the "AgrShortCu t" shortcut:
                  1) Remove any reference to the shortcut menu in your forms
                  >> THIS IS VERY IMPORTAINT << if you do not do this step the database may crash. I have had this happen in older versions and MS may have fixed the glitch; however, why chance it?

                  2) <ctrl><g>
                  2a) Application.Com mandbars("AgrSh ortCut").Delete


                  To create the shortcut menu:
                  Create a Shortcut Menu for a Form, Form Control, or Report
                  >> Note:
                  Either you must use late binding or the reference to the Microsoft Office 15.0 Object Library (or the current version thereof) must be set to use the examples provided in this link.
                  For the "late binding" set two constants msoBarPopup = 5 and msoControlButto n = 1 both as long, typecast a variable as a undefined object, then set this object to the desired commandbar using I've used simply the application.com mandbars._____ where the underscore is the correct call to add the menu or the control as needed (that should make sense when you read the examples). This may not be considered to be true late-binding; however, the reference isn't set and that will help with portability between clients. In development, I would advise the reference be set as the intellisense does make the coding faster and less likely to have syntax errors (and you can compile the code to check for syntax more easily) once ready, you can make the afore mentioned changes.

                  You should also take a look at this thread:
                  How to create a custom shortcut menu command that identifies the calling form/report?

                  You only need to run the VBA code once in the database to create the commandbar for the form.
                  Last edited by zmbd; Jun 10 '16, 08:30 PM.

                  Comment

                  • mshakeelattari
                    New Member
                    • Nov 2014
                    • 100

                    #10
                    much grateful.
                    But is it not possible to edit or change the existing one? please

                    Comment

                    • zmbd
                      Recognized Expert Moderator Expert
                      • Mar 2012
                      • 5501

                      #11
                      But is it not possible to edit or change the existing one?
                      That's not a very clear question:

                      + "AgrShortCu t" - as this is appearing in the Add-ins tab, your best bet is to recreate the shortcut menu. For some reason, Access is not treating "AgrShortCu t" as a form shortcut menu, why, IDK and I haven't even a good guess for you other than there are often version conflicts.

                      + The standard default shortcut menu I would recommend not altering in any way, instead, creating a custom commandbar as shown in my last posting. I find that altering the defaults tends to create other issues down the road that are best avoided.

                      Comment

                      • zmbd
                        Recognized Expert Moderator Expert
                        • Mar 2012
                        • 5501

                        #12
                        I've merged your two threads given that this is basically the same topic and the second thread provided a bit more information.

                        From the referenced database it appears to have four custom toolbars
                        "AgrMainMen u" - this appears to have been intended to be the only menu that would be available upon the database opening based upon the fact that the Employees form opens on database load. As explained earlier, bypassing the ribbon this way has been disabled in Acc2013+

                        "AgrmReport " - not sure where this commandbar is poping up. It should be part of the Add-Ins ribbon tab; however, not showing there as far as I can tell. Given that this is in the toolbars property of he form Access may be looking for a new style ribbon instead of the old style commandbar for Acc2013+

                        "AgrShortCu t" - this is the shortcut or right-click menu

                        "Email" - once again, not sure where this commandbar is poping up. It should be part of the Add-Ins ribbon tab; however, not showing there as far as I can tell (same thought about the ribbon/toolbar...)

                        But was unable to Edit/Change or Delete the Shortcut menu or the Tools bar from the database
                        To delete the commandbar, use the
                        Code:
                        Application.Commandbars("CommandbarNameHere").Delete
                        as already given.
                        From the design view of the referenced database, the commandbar in the Add-In tab is "AgrMainMen u"

                        To edit, we need a bit more information about how you want to edit the custombar and which one.

                        To create, you need to follow the directions already offered in my prior post about how to create the custom command bars in the newer versions of Access.

                        > The code attached to the shortcut command bar for the "Zoom" is the VBA Function ZoomOpen() in the Zoom_util module of the referenced database. That was attached to the .OnAction property of the button.

                        Perhaps a real old-school reference is needed here:
                        How to create command bars by using Visual Basic code in Access 2000
                        The examples here show more of the commandbar properties than my first links... of course, ignore the reference to the older MSO-Object library as you would be using the newer version for early binding as mentioned in my prior post.


                        Please note, we typically do not simply write code unless it's for something very simple or extremely complex for several reasons, one being that we are not sitting in front of your PC; thus unable to customize to your situation and the member will be able to apply their code/knowledge to other situations once they've developed the code for the current situation.
                        Last edited by zmbd; Jun 13 '16, 12:23 AM.

                        Comment

                        Working...