0% found this document useful (0 votes)
8 views4 pages

Ribbon

Ribbons in acess

Uploaded by

samuelkingsly100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Ribbon

Ribbons in acess

Uploaded by

samuelkingsly100
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

dd Ribbon customization XML to the

USysRibbons table

For the purposes of this example, suppose that you want to


prevent the users of your database from using any of the tools
on the Create tab. Furthermore, you want to create a new tab
called A Custom Tab with just the Paste command on it, as
shown in the following illustration.

The XML in the following procedure creates this configuration.

1. In the Navigation Pane, right-click


the USysRibbons table, and then click Datasheet
View on the shortcut menu.
2. Add the following data to the table. You can copy the
XML sample from this article and paste it directly into
the table.

ID RibbonNa RibbonXML
me
(AutoNumb My Tab <customUI
er) xmlns="http://schemas.microsof
t.com
/office/2006/01/customui">
<ribbon
ID RibbonNa RibbonXML
me
startFromScratch="false">
<tabs>
<tab idMso="TabCreate"
visible="false" />
<tab id="dbCustomTab"
label="A Custom Tab"
visible="true">
<group
id="dbCustomGroup" label="A
Custom Group">
<control
idMso="Paste" label="Built-in
Paste" enabled="true"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

3. This XML first instructs Access not to "start from


scratch" — that is, it specifies that Access should display
the default Ribbon tabs. Then, it tells Access to hide just
one of the default tabs (the Create tab). Finally, it
creates a new Ribbon tab named "A Custom Tab," adds
a command group named "A Custom Group" to the tab,
and adds the Paste command to the group. For more
information about this example and how to customize it
to suit your needs, see the section Understand the XML
example.
4. Close the USysRibbons table, and then close and
reopen the database.
Apply the custom Ribbon

Now that the custom Ribbon XML has been stored in a table,
do one of the following — depending on whether you want to
apply the Ribbon to the entire database or to a specific form
or report.

 Apply the custom Ribbon to the entire database

a. Click File > Options.

b. Click Current Database, and then under Ribbon and


Toolbar Options, select the Ribbon Name list, and
then click the Ribbon that you want — in this case, My
Tab.

c. Click OK.

 Apply the custom Ribbon to a specific form or


report

a. In the Navigation Pane, right-click the form or report


that you want to apply the custom Ribbon to, and then
click Design View on the shortcut menu.

b. If the property sheet is not already displayed, press F4


to display it.

c. At the top of the property sheet, under Selection type,


ensure that the object type (Form or Report) is selected
in the list.

d. On the Other tab of the property sheet, click


the Ribbon Name list, and then click the Ribbon that
you want to display when you open the form or report
(in this case, My Tab).

e. On the Quick Access Toolbar, click Save, or press


CTRL+S.

f. Close the form or report, and then double-click it in the


Navigation Pane to reopen it.

The Ribbon that you selected is displayed.

After you verify that your custom Ribbon works correctly, you
can hide the system tables again by doing the following:

1. Right-click the Navigation Bar at the top of the


Navigation Pane, and then click Navigation Options on
the shortcut menu.

2. In the Navigation Options dialog box, under Display


Options, clear the Show System Objects check box,
and then click OK.

You might also like