Access Ribbon

  • Thread starter CrazyAccessProgrammer
  • Start date
C

CrazyAccessProgrammer

I officially give up on trying to create custom Access 2007 ribbons. I've
read a few articles that state how complicated it was to create custom menu
bars prior to Access 2007, but if you ask me the ribbon is much more complex
and involved.

Can anyone recomend a good ribbon creation software program? I checked out
one web site that was mentioned in an Access 2007 book I have but was
wondering if any of you have experience with a software program that lets you
(easily) create custom Access 2007 ribbons.
 
A

Albert D. Kallal

CrazyAccessProgrammer said:
I officially give up on trying to create custom Access 2007 ribbons. I've
read a few articles that state how complicated it was to create custom
menu
bars prior to Access 2007, but if you ask me the ribbon is much more
complex
and involved.

Once you made "one" ribbon, then it a simple matter of cutting and pasting
text over and over to extend and create more buttons.

So, really, after you made "one" ribbon, then the next one is going to be
VERY little work indeed.

For example, for all reports, I built a custom ribbon as follows:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report">

<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />
<group idMso="GroupPrintPreviewClosePreview" />

</tab>
</tabs>
</ribbon>
</customUI>

The above is quite simple, easy to cut and past between applications
(something
you can't do with the old menu bars).

Even more amazing is you can cut the above
from this newsgroup message! (try that with a old button!!). In other words
you can go to web sites, or take the above and cut/paste the above into your
ribbons.

Using xml as above is REALLY nice because over time, the more examples and
ribbons you make, the larger your libaraly of "easter egg" hunting becomdes.
You have more stuff to build new ribbons.

In other words you ONLY have to build one ribbon..and after that
is much a cut/paste approach.

A ribbon like the above is not really needed because ms-access has it own
ribbons for reports. However, I plan to add a button for "email report".
and, adding that button is really easy.

All I have to do to add a new button is paste in the following to the
above:

<group id="Options" label="Report Options">
<button id="button1" label="Email" onAction="=MyEmail()"/>
</group>

The above will run a public VBA function called MyEmail when clicked on.

We could then add another button to convert the report to a pdf.

<button id="button2" label="Make PDF" onAction="=MyPDF()"/>

Now, I been doing the above as I type this message, but even as I type, you
can see that I am simply cutting + pasting. Lets assume I need 3 new
buttions.

I just cut/paste 3 times and we get:
<group id="Options" label="Report Options">
<button id="button1" label="Email" onAction="=MyEmail()"/>
<button id="button2" label="Make PDF" onAction="=MyPDF()"/>
<button id="button2" label="Make PDF" onAction="=MyPDF()"/>
<button id="button2" label="Make PDF" onAction="=MyPDF()"/>
<button id="button2" label="Make PDF" onAction="=MyPDF()"/>

</group>

So, now the above last 3 lines are the same, but then I just
start editing the text in "replace" mode.

eg:

<button id="button1" label="Email" onAction="=MyEmail()"/>
<button id="button2" label="Make PDF" onAction="=MyPDF()"/>
<button id="button3" label="Button 3" onAction="=Mybt3Code()"/>
<button id="button4" label="Button 4" onAction="=Mybt4Code()"/>
<button id="button5" label="Button 5" onAction="=Mybt5Code()"/>

See how fast the cut + paste idea works. I mean, it took me VERY little time
to
write out the above button code because I was cutting + pasting to write
this message to you. In fact, creating ribbons becomes much like writing a
email
or playing in a word processor. This process is MUCH FASTER then writing
code.

I think it darn cool that I just "posted" a ribbon in this newsgroup. Hence
this "plain text" system of xml allows me to not only cut + paste, but has
allowed me to share my ribbon with you with great ease in this message!

This ribbon approach is thus a VERY expressive system in which I can easily
post and give examples for all people to see here. And the bonus is you can
then even grab (cut/paste) what I done with the above and use it in your own
ribbon.
 
M

Maurice

Hi Albert,

Glad to see there are other people enjoying this ribbon xml as well. I'm
creating more and more ribbons just for fun. The only point i'm investigating
now is how to disable buttons based on events happening on e.g. a form. This
could easily be checked in the menubars but seems a little more difficult in
the ribbon. I'm playing around with the getEnabled option in xml to see if i
can get it done. ;-)
 
C

CrazyAccessProgrammer

Is there perhaps a resource of some kind for people (like me) who are total
beginners to ribbons? Like a 'How To Make Access Ribbons For Dummies?'
 
J

John Mishefske

CrazyAccessProgrammer said:
Is there perhaps a resource of some kind for people (like me) who are total
beginners to ribbons? Like a 'How To Make Access Ribbons For Dummies?'

There are many downloadable samples at Gunter Avenius' site:

http://www.accessribbon.de/en/

Studying these samples and a bit of Google should get you going...


--
John Mishefske, Microsoft MVP 2007 - 2009
UtterAccess Editor
Tigeronomy Software
web: http://www.tigeronomy.com
email: sales ~at~ tigeronomy.com
 
A

Albert D. Kallal

Maurice said:
Hi Albert,

Glad to see there are other people enjoying this ribbon xml as well. I'm
creating more and more ribbons just for fun. The only point i'm
investigating
now is how to disable buttons based on events happening on e.g. a form.
This
could easily be checked in the menubars but seems a little more difficult
in
the ribbon. I'm playing around with the getEnabled option in xml to see if
i
can get it done. ;-)
--


Download my example here:

The above automatically allows you to use:

MyRibbons("NameOfRibbio").Controls("DeleteInvoice").Enable = false

the above would disable the button called Delete Invoice on the ribbon....

I am REALLY busy and not had time to write up the above, but take a look at
the sample form to see it in action...

the "beauty" of the above system is that you can add more controls to a
ribbon, but NOT have to define additional things to enable, or disable
buttons on a ribbon and also the syntax is much like the old approach.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top