We help IT Professionals succeed at work.

Problems shifting Command Bars in MS Access 2003/2007 to customized ribbons in Office 2013

396 Views
Last Modified: 2014-06-06
Hi all,

I'm in the process of shifting menus and tool bars originally built in earlier versions of MS Access to customized ribbons in MS Access 2013 - mainly because there's no choice. The application had about 5 menu bars (with tool bars) and I've been looking at redesigning things simply because of the room the ribbons take and also the way they work. So one of the first questions I have is:

Is there an advantage having 1 ribbon with multiple tabs as opposed to 5 ribbons with 1 tab each. In either case there's a fair bit of making visible and not visible tabs or groups and perhaps controls too.

This sort of leads to the next question as since I've used code from the IDBE Avenius software I can't seem to find much in the way of examples in using multiple ribbons or even multiple tabs in the same ribbon. The code you can download makes sense for simple changes to ribbons but from what I can see not much more than that. Am I missing something ?

Thanks for any help or suggestions.

Regards,
John
Comment
Watch Question

AndyAinscowFreelance programmer / Consultant
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2011

Commented:
IN the ribbon approach as I have used it you set a tag for each ribbon element, (standard syntax)  and as long as you design the tags appropriately you van make visibility flexible via the getvisible callback.

For example I use one Ribbon and then mode groups according to context and in each group there are buttons that further subdivide according to context

The enclosed file is a simple <g> example which demonstrates within a group the moding of one or both controls and the group is itself one of the controls made visible/invisible.

Chris
CERTIFIED EXPERT
Top Expert 2011

Commented:
HM when it gave the docm option I thought it would upload!
getVisible.docm.zip
CERTIFIED EXPERT
Top Expert 2011
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks both Andy and Chris. It's a good method you've got Chris for your situation however I need to set up ribbons/tabs based on user accessibility and contextual situations. Hence I'm not sure that I would be able to use that method as the permutations would be large. Also the enabling or making visible the tabs/groups/controls seems activated by the ribbon itself which I understand can be called by using the Invalidate method on the IURibbon object that's been created. This seems to work ok in simple situations but in more involved situations such as making some tabs and groups invisible and some control invisible or disabled, this seems more complicated as almost each object needs to have it's own variable so that the ribbon knows what to do with it. Maybe I'm missing something here but in what I've seen so far that seems to be the way it works.

Does that make sense ? Maybe I should load a small example to illustrate my point.

Regards,
John
CERTIFIED EXPERT
Top Expert 2011

Commented:
Ah

Sorry but I did post from my mobile but it doesn't seem to have uploaded.

1. The selectivity can be triggered by any event so for example I trigger in my documents on open and change of the activedocument.

2. As you have seen with appropriate naming you can make combinations of tabs/groups/objects visible, for example if you have a numeric schema for your tags (i.e. mode 1 then display abc, mode 2 bcf then it can be done that way.

3. I am unaware of any alternative to the validate methd and hence some variant of tag naming is essential.

4. A sample file could well help.

Chris

Author

Commented:
Hi there,
Sorry to take so long to get back to you all but there's been a lot on (as usual) and I've been prompted by the system multiple times now !
In all that time I've actually spent a bit of time on the ribbons and the application and now start to have some sort of reasonable things that works. However I'll share with you some of the things I've discovered to see what you think.

1. Firstly in the applications I maintain the visibility and whether they're enabled or not is based on
    a) who the user is
    b) what the ribbon control is linked to in terms of application functionality
    c) where the user is in the application

a) and b) are pretty obvious but with c) there comes the necessity to "invalidate" a control or the ribbon itself (usually the latter from what I've found) and this is done in code from potentially any where in the application. Hence in reality I've found that the application needs to know obviously a) which is static in the sense that it's always that way for the life of the application for that user, obviously b) and some application variables which denote where the user is in the application which can dictate whether certain controls are visible or enabled. So in the xml found I've found that the control id is usually sufficient and that to include a tag is not always usable in my applications.

2. I've found that when the ribbon or control is "invalidated" then this does NOT trigger the code to call the GetEnabled or GetVisible (or other) functions UNTIL"visibility" is required. So when opening a form in MS Access and there is code for the Open, Load and Activate events (which runs in that order), even though the ribbon may have been invalidated in the Open event, the ribbon control functions are not called until the end of the activate event which involves the visibility of the form. This sort of makes sense but at the same time you have to be aware otherwise the code can potentially expect "things" have been done by the invalidation method which in fact is not true until the visibility of the form is active.

Hope this makes some sort of sense and would welcome any comments.

Thanks and regards,
John

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.