473,386 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Shortcut Menu Bar

99 64KB
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 "agrShortcut" 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...
Apr 9 '15 #1
11 9855
zmbd
5,501 Expert Mod 4TB
need a bit more details...
Apr 17 '15 #2
mshakeelattari
99 64KB
What kind of information may be needed please?
Apr 18 '15 #3
zmbd
5,501 Expert Mod 4TB
+ 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?
Apr 18 '15 #4
mshakeelattari
99 64KB
+ 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 "AgrShortCut"
+ 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.
Apr 17 '16 #5
mshakeelattari
99 64KB
Can I send the mdb access file?
Jun 8 '16 #6
zmbd
5,501 Expert Mod 4TB
[2016-06-09:56UTC::update 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:
http://www.accessribbon.de/en/?Welcome
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
Jun 9 '16 #7
mshakeelattari
99 64KB
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.
Jun 10 '16 #8
zmbd
5,501 Expert Mod 4TB
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 "AgrShortCut" 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.Commandbars("AgrShortCut").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 msoControlButton = 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.commandbars._____ 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.
Jun 10 '16 #9
mshakeelattari
99 64KB
much grateful.
But is it not possible to edit or change the existing one? please
Jun 11 '16 #10
zmbd
5,501 Expert Mod 4TB
But is it not possible to edit or change the existing one?
That's not a very clear question:

+ "AgrShortCut" - 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 "AgrShortCut" 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.
Jun 11 '16 #11
zmbd
5,501 Expert Mod 4TB
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
"AgrMainMenu" - 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+

"AgrShortCut" - 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
Expand|Select|Wrap|Line Numbers
  1. Application.Commandbars("CommandbarNameHere").Delete
as already given.
From the design view of the referenced database, the commandbar in the Add-In tab is "AgrMainMenu"

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.
Jun 13 '16 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: deko | last post by:
I've found that the "Remove Filter/Sort" selection in the Shortcut menu (displayed on right click) produces ugly, untrappable errors, even though "Allow Filters" is set to No in the subform. ...
3
by: Terry Bell | last post by:
I have some code that adds entries to the "Module Compiled" popup menu. Works fine in A97. You can open a module, right click, and the new entries are there for you to click. I converted it to...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
2
by: JMCN | last post by:
hi i'm having a problem with the customize a shortcut menu. i read the ms office assistance: customize a shortcut menu/delete a command or add to a shortcut menu and followed the simple...
5
by: Steven | last post by:
I have some text boxes on a form in MS Access 2000. When I right click in them I don't get any shortcut menu at all. I want the normal cut, copy, and past menu to come up. In the "Startup", I...
1
by: stinehelferw | last post by:
I need a right-click menu on a form list control with combobox controls. I used View->Toolbars->Customize to create a toolbar. I added ComboBox through commands tab. I set properties to Popup...
2
by: Jim Devenish | last post by:
I have set up shortcut menus on many form successfully. However, for the first time, I am trying to set one up on a subform. In the 'On Action:' when customising the menu item I have:...
0
by: Jim Devenish | last post by:
I have successfully added shortcut menus to Forms but I am now having difficulty when I attach a shortcut menu to a text control. I have a shortcut menu entitled 'CalendarEntries' with one command...
3
by: munkee | last post by:
Hi all, I have been playing with pivotcharts lately to display my data from my database. I have since found however that I will need to get rid of a lot of the "options" a user has to mess around...
3
beacon
by: beacon | last post by:
Hi everybody, I'm using Access 2010, but the format for the database is .mdb because I'm not ready to fully convert it to Access 2010 and the .accdb format. I've been reading up on how to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.