Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Include Undo / Redo buttons in custom ribbon

349 views
Skip to first unread message

Bob Darlington

unread,
Dec 19, 2010, 9:49:26 PM12/19/10
to
Using Access 2010.

I've designed (with much help from this ng) a set of custom ribbons for my
app.
I now want to hide the QAT items (which I've done) and include the Undo/Redo
buttons in an existing group in my ribbon using:

<group id="RecordsGroup" label="Records">
<button idMso="RecordsRefreshRecords" keytip="r" size="large"/>
<button idMso="GoToNewRecord" size="large"/>
<button idMso="RecordsSaveRecord" keytip="s" size="large"/>
<button idMso="RecordsDeleteRecord" keytip="x" size="large"/>
<button idMso="SpellingAccess" keytip="s" size="large"/>
<button idMso="Undo" size="large"/>
</group>

The ribbon shows all the other defined buttons but ignores the 'Undo' one.
If I hover over 'Undo' in the 'Customise the Ribbon' screen the tip says
'Commands not in the Ribbon | Undo (Undo)'.
Is there a way around this without using a callback function?

--
Bob Darlington
Brisbane


Albert D. Kallal

unread,
Dec 20, 2010, 6:25:52 AM12/20/10
to
?"Bob Darlington" wrote in message
news:4d0ec430$0$13394$afc3...@news.optusnet.com.au...

> <button idMso="Undo" size="large"/>

>Is there a way around this without using a callback function?

Yes, and you should be receiving a error message when you do the above. Undo
is not a button.

You should turn on UI errors in the options, and thus any bad xml will
generate an error message.

The undo command is part of a gallery, and is not a ribbon button. So, the
correct xml should be:

<gallery idMso="Undo" size="large"/>

So, try the above xml, and your undo should display and work just fine.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenos...@msn.com

Bob Darlington

unread,
Dec 21, 2010, 1:53:19 AM12/21/10
to
Thanks Albert. That works fine.
I'm making slow progress, but its coming along thanks to the help from
yourself and others.

--
Bob Darlington
Brisbane
"Albert D. Kallal" <PleaseNOOO...@msn.com> wrote in message
news:23HPo.14899$Qi5....@newsfe01.iad...

Albert D. Kallal

unread,
Dec 21, 2010, 3:23:35 AM12/21/10
to
?"Bob Darlington" wrote in message
news:4d104ed7$0$3032$afc3...@news.optusnet.com.au...

>Thanks Albert. That works fine.
>I'm making slow progress, but its coming along thanks to the help from
>yourself and others.
>
>--
>Bob Darlington
>Brisbane

You are most welcome. However, when I first looked at your exmaple, it
looked 100% to me.

So, I just fired up a sample database and pasted in your one button. the
error message access spit out was:

===================================================
Error found in c:\Users\AlbertKallal\Documents\Database21.accdb
Line: 8
Column: 51
Error Code 0x80004005
The specified control type button is incompatible with the actual control
type 'gallery'
ID:undo
===================================================
Note the ID in the above (undo) and the comments about gallery. This error
message thus tipped me off.
(so, the ID can be searched on in your custom XML to find where this error
is).

However, you ONLY get the above error if you turn on UI errors in backstage.

So, file->options->client settings, scroll down until you see General area,
there is a option you should check on:

[x] Show add-in user interface errors

If you have the above box checked, then you would have received the above
error message. That error message played a big part in me seeing that option
was an gallery and not a button.

And to you comments about learning? That is great since there is so many new
things to learn in Access.

I think without all these new things, Access would not be near the barrel of
monkeys it is now.

Bob Darlington

unread,
Dec 21, 2010, 6:01:58 PM12/21/10
to

"Albert D. Kallal" <PleaseNOOO...@msn.com> wrote in message
news:oz%Po.17043$Qi5....@newsfe01.iad...

Thanks Albert.
I've now got that checked and tested.
Would have saved me a lot of time if I'd known about it before. But that's
life with MS.
I must admit to being an enthusiastic convert to the Ribbon after a
reluctant start.

--
Bob Darlington
Brisbane


0 new messages