By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,107 Members | 1,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,107 IT Pros & Developers. It's quick & easy.

Access 2007 Toolbar Issue

P: 63
We have set up a function as listed below to display a custom toolbar used to
export data from the report. The function is called from the open event of
each report:

Function CBShowPrint()
Application.CommandBars("BranchPrint").Enabled = True
Application.CommandBars("BranchPrint").Visible = True
End Function

We recently converted from Access 2003 to Access 2007. (The custom toolbar was created in Access 2003. There are 3 issues with the conversion:

1) The user must now click on the menu item Add-Ins to display the toolbar
2) The Export to Excel no longer functions indicating an incorrect format.
3) The Export to Word has disappeared

My questions are as follows:

1) Can the Add-Ins click be bypassed programmatically, so the user sees
the custom toolbar as soon as the report opens.

2) It is my understanding that Access 2007 no longer allows the creation of
custom toolbars. Can the above function be modified to programmatically
display toolbar items which allow extracts to Excel and Word for the Access
2007 format

Thanks in advance
Nov 6 '09 #1
Share this Question
Share on Google+
10 Replies

Expert 100+
P: 234
I was just looking at the options for making customizations to the 2007 Ribbon yesterday. The Ribbon uses XML as its source, so what you do in Access is create a table in your database called "USysRibbons" with ID, RibbonName and RibbonXML fields. Create the XML in the proper format and put it in the RibbonXML field, then load the custom ribbon you want using the RibbonName property in Startup or on any form or report.

This is the tutorial on it from msdn that I was looking at:

There isn't a way to make an old 2003 toolbar appear anywhere other than "Add-Ins." If you're going to be using 2007 or newer, you should use the Ribbon.

The tutorial also explains integrating with other Office applications, which should answer your question about exporting to Word or Excel.

EDIT: P.S. This tutorial is part one of 3. The first part explains customizing the Ribbon, the second enumerates and describes the attributes and elements of the Ribbon, and the third is a FAQ. The three parts are grouped together in the list box on the left side of the msdn site.
Nov 6 '09 #2

P: 63
Thank you. I have already began going through the examples and have successfully created items on the ribbon. (It seems to have a lot more capability than before, however, it used to be simpler and easier with the 2003 toolbars! )
Nov 6 '09 #3

Expert 100+
P: 378
Two must have tools when doing your ribbons:

IDBE Ribbon Creator
A visual ribbon designer.. you can interface this directly with your database, or create ribbons from scratch and export the code to XML. I usually use this when using a new feature (drop down boxes, complex menus, etc), see how the code gets exported, and then implement that into my database.

Office 2007 Custom UI Editor
A simple intellisense validator. Good for when you screw up your code and need to find out exactly what went wrong.
Nov 6 '09 #4

Expert 100+
P: 234
Hey, Megalog, you obviously have experience in this realm. MS has ended corporate support of Office 2003, prompting businesses to "upgrade" to 2007. Since I see this as becoming a common issue as more companies make this transition, why don't you do a How-To on customizing the ribbon, including links to helpful resources like the apps you reference, in the "Insights" area?
Nov 6 '09 #5

P: 63
tofer23, Megalog

Thanks for the great responses. I have checked the websites you have suggested and keyed in some of the examples to create the various customizations. Do either of you know if these customizations can be used to create something that looks like a toolbar and does with the Access 2007 customizable toolbar does. I set up the Access 2007 customizable toolbar exactly the way I would like it by bringing in the various functions to export data to various applications. I would like this toolbar to display whenever the user clicks on any of the reports I have developed within the application. The problem is that this toolbar is specific to my Access 2007 software and not the application I have developed, which gets deployed to various users. In addition, I could not toggle it off and on depending on when the user clicks a report. Do either of you know if the ribbon can be used to create something resembling this toolbar, which can perform the various data export functions, and then be activated whenever the user clicks on a report. In Access 2003, I set up a function to activate such a toolbar which was triggered from the open event of each report.
Nov 7 '09 #6

Expert 100+
P: 234
This is all in the msdn tutorial.
Nov 9 '09 #7

P: 63
Looks like tha's it. I was hoping to imitate the Access 2003 toolbar in that when the user clicks a report, the toolbar appears. It looks like that the user will have to first click the menu item, and then the control items will appear. It should be okay. Thanks for the help.
Nov 9 '09 #8

Expert 100+
P: 234
Unfortunately, the Ribbon isn't quite what the old menus and toolbars were, but it is very useful. At the very least, you can turn off the ribbon tabs you don't want so only the custom one appears. That may solve some of your problems.

msdn tutorial:
The tabs displayed in the Fluent UI are additive. That is, unless you specifically hide the tabs or set the Start from Scratch attribute to True, the tabs displayed by a form or report's UI appear in addition to the existing tabs.
So, in your ribbon's XML, set
Expand|Select|Wrap|Line Numbers
  1. <ribbon StartFromScratch="True">
and it will be the only tab on your ribbon.
Nov 9 '09 #9

Expert 100+
P: 378
I might do that someday, if I get the time. The thing is, I dont like referencing the MSDN tutorials since I think they're badly written. So I would probably have to write up quite a bit of material that actually flows correctly, unlike the tutorials which bounce all over the place and supplies bad code.
Nov 9 '09 #10

P: 63
topher23, I set StartFromScratch to True and have come as close to the Access 2003 toolbar as Access 2007 will allow. Thanks again. Megalog, I agree with topher23's idea for writing up some new documentation and would concur with your opinion on some of the existing MSDN documentation.
Nov 12 '09 #11

Post your reply

Sign in to post your reply or Sign up for a free account.