Custom Toolbar in Office 2007

J

JudithJubilee

Hello there,

I have a number of databases that were created in Access 2003. On all my
reports I have a custom toolbar that appears with two buttons - one to Print
and one Close. It pops up at the top right and is unmovable/cannot be closed.

When I open any of these databases in 2007 it's telling me it can't find the
toolbar. Now I know I could open each of reports in design view and remove
the Toolbar property. However, there are a heck of a lot of reports! But
mainly - my clients love the little toolbar!

Any suggestions for a quick way of removing/disabiling it and also I was
going to go round each pc and add two icons to their QAT - is this the best
way??

Thank you in advance for your thoughts

Judith
 
R

Rick Brandt

Hello there,

I have a number of databases that were created in Access 2003. On all my
reports I have a custom toolbar that appears with two buttons - one to
Print and one Close. It pops up at the top right and is unmovable/cannot
be closed.

When I open any of these databases in 2007 it's telling me it can't find
the toolbar. Now I know I could open each of reports in design view and
remove the Toolbar property. However, there are a heck of a lot of
reports! But mainly - my clients love the little toolbar!

Any suggestions for a quick way of removing/disabiling it and also I was
going to go round each pc and add two icons to their QAT - is this the
best way??

Thank you in advance for your thoughts

Judith

Did you convert the files to the new accdb format or what exactly? If
you are simply opening the same files in 2007 the custom toolbar should
be there.
 
J

JudithJubilee

Thank you for your help with this Rick,

I haven't converted them as yet because some people are still using the old
version unfortunately.

If I did would they then appear in the Add-in tab? If I want to keep them as
2003 for now what would you suggest??

Thanks again

Judith
 
A

Albert D. Kallal

I would consider using a custom ribbon menu in 2007.

I have a working sample here:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

grab the one called :
Access 2007, hidden interface example

In the above...try running the report. That report simply has a ribbon set
for the report and gives the user a nice set of options. And, when you close
the report..the report preview menu is hidden for you....
 
S

sandrao

I would consider using a custom ribbon menu in 2007.

I have a working sample here:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

grab the one called :
Access 2007, hidden interface example

In the above...try running the report. That report simply has a ribbon set
for the report and gives the user a nice set of options. And, when you close
the report..the report preview menu is hidden for you....

How is this reduced ribbon effect achieved?
 
J

JudithJubilee

Hello Albert,

I think I may having a blonde moment but when I open your database from the
link it doesn't have anything other than the regular Preview Tab....

To be honest I could just get my clients used to this if this is what you
mean but your comment about a 'custom' ribbon menu has intrigued me??


Thanks again

Judith
 
A

Albert D. Kallal

I would consider using a custom ribbon menu in 2007.

I have a working sample here:

http://www.members.shaw.ca/AlbertKallal/msaccess/DownLoad.htm

Actually, that way of hiding the ribbon is from the 2007 help.

While in the code editor, go help, and type in

Hide Ribbon

You get a some hits....the 2nd topic in the help shows how I did this.

In a nutshell, you simply specify your own custom ribbon like:


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true"/>
</customUI>


So, the above custom ribbon hides the interface. (you just specify the above
ribbon in the startup settings).

However, you can in your startup code also hide all ribbon stuff with one
line of code:

DoCmd.ShowToolbar "Ribbon", acToolbarNo

The above even hides the office button. (for some reason, the above line of
code DOES NOT work in my download sample of wordmerge07, but it works in any
database you create). the only downfall of using that one line of code is
you then can't use/have custom ribbons....

Also, keep in mind you can simply hide the ribbon by double clicking on any
option group...it will autohide (and, you can still click on a option group
and it will un-hide).
 
A

Albert D. Kallal

JudithJubilee said:
Hello Albert,

I think I may having a blonde moment but when I open your database from
the
link it doesn't have anything other than the regular Preview Tab....

You mean the ribbon for the report? Well, actually, it is a custom ribbon,
but it "pulls" the built in options I wanted. (so, it "really" looks like
the
preview ribbion, but it is not).

do the following:

exit my sample, then re-enter the sample (but hold down the shift key to
by-pass all startup).

You should see the regular access view and not the startup form or hidden
ribbon.

Now, open up the table called

UsysRibbons

(this is a system table, so if it not showing, right click on the nav pane
and choose navigation options, on that screen make sure the

[x] show system objects box is checked., else you not see that table called
UYsyRibbions.

Open up record with the ribbon called MyReport

You will see:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report">

<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />
<group idMso="GroupPrintPreviewClosePreview" />

</tab>
</tabs>
</ribbon>
</customUI>

Lets add custom button to the above that says hello when you click on it:

So, change the above to:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report">

<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />
<group idMso="GroupPrintPreviewClosePreview" />

<group id="group1" label="My Group">
<button id="button1" label="Hello Button"
size="large"
imageMso="DateAndTimeInsert"
supertip="If you click on this buttion,
it will display hello"
onAction="=msgbox('Hello')" />
</group>

</tab>
</tabs>
</ribbon>
</customUI>


If you look at the above, we really just pasted in a new "group" as:

<group id="group1" label="My Group">
<button id="button1" label="Hello Button"
size="large"
imageMso="DateAndTimeInsert"
supertip="If you click on this buttion,
it will display hello"
onAction="=msgbox('Hello')" />
</group>

note I wrapped the "supertip text" as above...leave that way.

Now, close this USYSribbons table. Now exit the database. Now re-launch the
database and try the report.

You can see we added a new button. Once you made 2 or 3 buttons, then you
cut and paste them over and over again to make a report.

Some articles on how to make these ribbons is here;

Customizing the Office Fluent User Interface in Access 2007
http://msdn.microsoft.com/en-us/library/bb187398.aspx

and

http://www.access-freak.com/tutorials.html#Tutorial05
 
S

sandrao

Hello Albert,
I think I may having a blonde moment but when I open your database from
the
link it doesn't have anything other than the regular Preview Tab....

You mean the ribbon for the report? Well, actually, it is a custom ribbon,
but it "pulls" the built in options I wanted. (so, it "really" looks like
the
preview ribbion, but it is not).

do the following:

exit my sample, then re-enter the sample (but hold down the shift key to
by-pass all startup).

You should see the regular access view and not the startup form or hidden
ribbon.

Now, open up the table called

   UsysRibbons

(this is a system table, so if it not showing, right click on the nav pane
and choose navigation options, on that screen make sure the

[x] show system objects box is checked., else you not see that table called
UYsyRibbions.

Open up record with the ribbon called MyReport

You will see:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon startFromScratch="true">
    <tabs>
        <tab id="MyReport" label="Report">

            <group idMso="GroupPrintPreviewPrintAccess" />
            <group idMso="GroupPageLayoutAccess" />
            <group idMso="GroupZoom" />
            <group idMso="GroupPrintPreviewClosePreview" />

      </tab>
    </tabs>
  </ribbon>
</customUI>

Lets add custom button to the above that says hello when you click on it:

So, change the above to:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon startFromScratch="true">
    <tabs>
        <tab id="MyReport" label="Report">

            <group idMso="GroupPrintPreviewPrintAccess" />
            <group idMso="GroupPageLayoutAccess" />
            <group idMso="GroupZoom" />
            <group idMso="GroupPrintPreviewClosePreview" />

            <group id="group1" label="My Group">
              <button id="button1" label="Hello Button"
                  size="large"
                  imageMso="DateAndTimeInsert"
                  supertip="If you click on this buttion,
it will display hello"
                  onAction="=msgbox('Hello')" />
             </group>

      </tab>
    </tabs>
  </ribbon>
</customUI>

If you look at the above, we really just pasted in a new "group" as:

            <group id="group1" label="My Group">
              <button id="button1" label="Hello Button"
                  size="large"
                  imageMso="DateAndTimeInsert"
                  supertip="If you click on this buttion,
it will display hello"
                  onAction="=msgbox('Hello')" />
             </group>

note I wrapped the "supertip text" as above...leave that way.

Now, close this USYSribbons table. Now exit the database. Now re-launch the
database and try the report.

You can see we added a new button. Once you made 2 or 3 buttons, then you
cut and paste them over and over again to make a report.

Some articles on how to make these ribbons is here;

Customizing the Office Fluent User Interface in Access 2007http://msdn.microsoft.com/en-us/library/bb187398.aspx

and

http://www.access-freak.com/tutorials.html#Tutorial05

I tried using your found in UsysRibbons that hides the ribbon which
works find but from what I can see once this there is no way Unhide
the ribbon if one wants to
make some additions or changes in the Ribbons.

Can the hide feature be changed through vbcode ?

sandrao
 
A

Albert D. Kallal

I tried using your found in UsysRibbons that hides the ribbon which
works find but from what I can see once this there is no way Unhide
the ribbon if one wants to
make some additions or changes in the Ribbons.

Can the hide feature be changed through vbcode ?

sandrao

---------

You can exit, and then re-load the
application, but hold down the shift key to by-pass the start-up options. If
want, you can even disable the shift key by pass *when* you are ready for
deployment.

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you must
shift-by-pass them when you want to work. I done this "dance" all day since
using access 97. There is NO way to develop with the user startup options
in place.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute.

Note that if you NOT testing the startup form, but just ONE report/form with
a custom ribbon and are making lots of changes, then simply put a
compact/repair option in the qat. Then, when you make a change to a ribbon,
you close the table, and then while holding down the shift key, hit your
compact and repair button. Your appcation will "re-load" the ribbons and you
do NOT have to exit the database. in fact, if you want to test in user mode,
you simply whack the compact/repair button and do NOT hold down the shift
key. So, that compact/repair buttion on the qat saves you the need to
enter/exit the database all day long when you make a change to the ribbon.

If you have a from that needs some custom buttons in the ribbon, then simply
specify the ribbon name for that form and your custom ribbon will display
when the form is launched. By specifying the ribbon name for a form (or
report), then you don't need to write any code to hide, show, or switch what
ribbon displays for what form/report etc.
 

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