Solved

How to Use Ribbon Creator 2010

Posted on 2013-12-28
7
711 Views
Last Modified: 2014-01-03
I want to create a custom menu/ribbon in the application I am developing in Access 2010.  This ribbon will be loaded at startup of the application and replace the default ribbon.  I've done this dozens of times in Access 2003 and prior but the process is quite different in 2010.
In several EE posts I've seen 'Ribbon Creator 2012' by GA recommended.
I went to the site, downloaded the demo version and looked thru all of the screen snapshots displayed.  I understand the demo version limits the number of controls.  I am willing to buy the complete version but wanted to see how/if it works first.

I got a pretty good feel for creating custom ribbons, adding tabs button. controls etc.. by playing with the demo version of the product.
However, when it came time to use my new knowledge to create an actual custom startup ribbon for my application I got nowhere.   When I wanted to open my Access .accdb from within 'Ribbon Creater 2010' I got a message,  'There is no table UsysRibbons in the selected application".

Really not sure where to go from here.  There are some screen snapshots on the product website that show how to create various objects on the ribbon but not much else in the way of documentation.

Anybody know the process of using this tool and incorporating the created ribbon into an application.  I can see how to create buttons but don't at all see how to connect the button to an object (Form, Function, Report etc. in my application)

1. Using this product, how do I create a custom ribbon and incorporate it into my application.?

2. Once the ribbon is created how to I associate my Forms, reports or functions with the options on the ribbon?

3. I see references to 'callback' on many of the screen shots on the website.  What is a callback?
0
Comment
Question by:mlcktmguy
  • 3
  • 3
7 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 334 total points
ID: 39744604
Essentially, you create a New Ribbon, and then use the Finish tab on the Ribbon Creator interface to move those changes into your database. Note the various options on that screen, and be sure you know what each means. For example, you generally want to check the "copy basCallbacks" box, but if you do that initially, and then make changes to your ribbon, you may want to uncheck that when you move the new changes back into the database.

I would STRONGLY suggest you do this on a test or backup copy of your database. When you're comfortable with the process, you would do your work on the live copy.

You can set a ribbon to be used with a specific form in the Access interface. Open the form/report in design view and set the Ribbon Name property.

The CallBack is a module that is created that handles the "calls" from the ribbons - essentially, the "on action" part of the ribbon item. You'll note this relates to a function in basCallbacks for each ribbon item. For example, if I have a ribbon item named "rbExit", I'd have a callback that would handle the action for that item (it's in a procedure named "OnActionButton" in basRibbonCallbacks).

Trust me when I say  that if you must work with ribbons in MSFT Access, you really, really need this tool. It is well worth the money, and will save you tons of work.
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 166 total points
ID: 39744976
In addition to and in agreement with to what Scott has noted, here are a couple of additional links to important info on Gunter's site - that may not be easy to find:

30 some sample dbs with LOADS of examples, all of which I have downloaded:
http://www.accessribbon.de/en/index.php?Downloads.

FAQs - be sure to read *all* of these:
http://www.accessribbon.de/en/index.php?FAQ

"but not much else in the way of documentation."
Actually, there is ... but unfortunately it's a bit scattered around on his various sites. Also, the Help file that comes with the product is pretty good. You *really* should go through the entire help file - well worth your time.

Further ... as Scott noted ... be SURE to make a backup of your db prior to each major 'session' with RibbonCreator - just in case.  Making a backup is literally as quick as Control C, Control V in Windows Explorer.

" Note the various options on that screen, and be sure you know what each means"
Yes ... be  *sure* you understand what each of these options do (Help will 'help') and the ramifications of using each setting.


The good news:
Once you see and understand how RibbonCreator works ... you will be amazed at the functionality. Gunter is literally giving it away at $30 some dollars - trust me. There is no other product even remotely close to this product - I've tried them all.

mx
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 39745181
From the little I've seen I agree with both of you.  I purchased the full version of the product.
Following Scott's direction I was able to create a test menu and implement it into a TEST (Yes I took you very seriously) Access 2010 accdb.
I also downloaded many of the examples in the link from DatabaseMX.

My first simple menu has two type of objects, buttons and a combo box.

After creating my ribbon and doing the 'finish', I opened my application was able to find the created controls in 'basRibbonCallbacks'.  I started out simply by putting my own Msgbox popups where I thought they should be to make sure the options were being reached.

I then changed my msgbox popups to DoCmd  commands.  Like these"

DoCmd.OpenForm "frmParmFile"
DoCmd.OpenForm "frmPayoffCalculator", acNormal, , , , , True
DoCmd.OpenReport "Rpt_Misc_Local", acViewPreview
DoCmd.OpenReport "Rpt_Hello_Letter", acViewPreview

I ran into an issue when I replaced some of these line with a command to execute a function.

For example:
DoCmd.RunCommand Open_menuTestPayoff()
instead of:
DoCmd.OpenForm "frmPayoffCalculator", acNormal, , , , , True

The functon was completely simple, here it is:

Public Function Open_menuTestPayoff()
DoCmd.OpenForm "frmPayoffCalculator", acNormal, , , , , True
End Function

The form opened but I got runtime error '2501' the runcommand action was canceled.  The same thing happened when I tried opening the report in a function.

What am I doing wrong?

This is very important to me because it is something I do frequently.  In my apps I open most of my forms and reports from modules.  The beginning of the module call, checks security to make sure the user selecting the option has internal authority to use it.  If they don't they are denied access.

How do I call functions correctly from 'basRibbonCallbacks'?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 84
ID: 39745248
If your intent is to run the Function named "Open_menuTestPayoff", then don't use the DoCmd syntax, just call it directly. For example, if I wanted to call that from the Click event of Somebutton:

Sub Somebutton_Click()
  Open_menuTestPayoff
End Sub

But honestly, if your Method calls do nothing more than open a form or report, I don't see the need to have two "levels" of code that does this - just call it directly in the Ribbon CallBack,, and be done with it.
0
 
LVL 1

Author Comment

by:mlcktmguy
ID: 39747389
I can see the danger of the 'Finish' options when working with a ribbon that is already operational in an application.  So what are the recommended settings/process when adding new option to a ribbon already in use in an application.

You obviously don't want to overlay the callback module or you would have to redo all of the code you entered when the ribbon was first created.

You do want the layout of the new ribbon because you want to see your new options.

What parameters should be selected on the finish screen when updating a ribbon in already functional in an existing database?
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 334 total points
ID: 39747951
I'd uncheck the "Copy basRibbonCallbacks etc etc" box, and leave everything else as it is. If you don't want to set that ribbon as your App Ribbon, you could uncheck that as well (useful if you're adding other ribbons in, like popup ribbons).

Note that I choose to use the "Add Select Case Statements etc etc" box, which shows all of my action items as a Select Case statement. This is easier and more intuitive for me. If you use that method, then you'll have to manually edit the Callbacks methods to include any new items after making your ribbon changes. That's just adding a new Case statement to the Select Case structure, however, so it's relatively painless.
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 39754732
Thanks so much for your help.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now