Queries and Ribbons

mikemaki

Registered User.
Local time
Today, 22:34
Joined
Mar 1, 2001
Messages
81
We are converting a charges database from 2003 to 2007. it has few reports. Most of the reporting is done by opening queries in datasheet view and using a toolbar, exporting it to Word, Excel, etc. Now we will be using a ribbon. Is tthere a way to relate a query to a ribbon or change the ribbon being used via VBA?
 
Thanks for the quick response, but the ribbons are already created. We just want to use the secure ribbon that cotains no tabs until the queries are opened in datasheet view. Then we want to switch to the export ribbon.
 
It would be a matter of changing the name of the ribbon. I'm guessing you're using the USysRibbons table to store the xml for your ribbon?

You can set the ribbon, like this:

NameOfQuery.RibbonName = "NameOfRibbon"

How is your query called?
 
DoCmd.OpenQuery stDocName, acNormal, acEdit

With queries it's a difficult one because they don't have events as such. My advice would be to create a form that is based on that query and set it to Datasheet view. Then you can set the RibbonName property. Sounds like a plan?
 
Or, use code (don't have a clue what code) to set it just before this line:

DoCmd.OpenQuery stDocName, acNormal, acEdit
 
It would interesting to hear how it went. Good luck.
 

Users who are viewing this thread

Back
Top Bottom