Callback For Ribbon Tab Click or Activate

J

Jerry Fox

I have tried onAction in the <Tab line but it cause failure of the Ribbon
XML file and the Std Access ribbons shows, not my customized one.

Surely there is a simple way to have a callback function execute when you
click any Tab and read the id and take action appropaite such as show a
particular form or report rather than force the user to click again to show
the form or report. Any help will be and is appreciated.


I did post this on Access Database Geeral Questions with no repsonse,
hopefully the experts monitoring this forum know the answer.
 
S

Sky

Jerry Fox said:
I have tried onAction in the <Tab line but it cause failure of the Ribbon
XML file and the Std Access ribbons shows, not my customized one.

Surely there is a simple way to have a callback function execute when you
click any Tab and read the id and take action appropaite such as show a
particular form or report rather than force the user to click again to
show
the form or report. Any help will be and is appreciated.

Each ribbon object has its own attributes as documented by Microsoft. Since
Microsoft programmed the ribbon to respond to these specific attributes, you
cannot change it. Assigning an invalid attribute will fail to even load, as
you saw.

If you want one-click access to a form or report, then define a button or
other control on a tab that does have a suitable onAction attribute. You can
place the button on the first ribbon tab, so it is always displayed by
default.

I do wish Microsoft provided some additional ribbon manipulation tools, such
as bringing forward a specific tab when needed. Microsoft partially supports
this with contextual tabs when initially opening forms and reports, but
bringing forward tabs is useful in many other situations. (Even with forms
and reports, returning the focus to an already opened form does not bring
its ribbon forward automatically, as you would expect. Toolbars yes, ribbons
no.) As far as I know, the only approach for us developers to bring a tab
forward is the less dependable SendKeys, and then you better have your
keytips specified carefully.

- Steve
 

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