"CP" <(E-Mail Removed)> wrote in message
news:8b35c622-0f57-472a-8894-(E-Mail Removed)...
Thanks, Albert.
I'm pretty sure that my next question is one that I should know the
answer to but...
When I use the RibbonName = "Name of Ribbon from USysRibbons..." code,
I get "Variable RibbonName not found". When I put RibbonName as a
CommandBar or as an Object, I get error #91 (the dreaded "Object
variable or With Block Variable not set"). How should it be declared?
Let me try this....
Ok, Yes, you are right. The RibbonName ONLY works if you have a form open
(ribbonname is an property of an form..and you can use this to
switch/change the ribbon that is displayed but only with a form)
However, in your case, the "whole" problem (and I now realize your
original problem) is you DON'T have a form open here, but just the
query builder in design mode...
Ok, that means we have to simply allow the built in ribbon to display
(and you hint you don't want that).
You have to re-purpose the built in ribbon in this case. That means you have
to decide what features/options you want from the original design ribbon to
display. Another way to handle this
would be to use "start from scratch = true" to hide built in, and then
enable some query design groups you create in this replacement ribbon.
I never re-purposed built in ribbons. How to do this is outlined here:
http://www.accessribbon.de/en/index....Access_Ribbons
Because I not done the above, then I would suggest you simply build your own
ribbon, and specify this ribbon as the Application wide ribbon. (and, then
simply use visible settings (call backs) to hide parts of this main ribbon
and turn on (display) the parts you need for the sql design mode. I
suggesting this as an somewhat easer path then trying to re-purpose all of
the query design ribbon (I think it less work).
it not clear, but I would assume you now have a system wide "default" ribbon
for your application? (this ribbon is where I would add in the ribbon design
parts you need/want into a custom ribbon group..and the you can hide/show
this group for query desing mode).
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)