Create an application-level custom Ribbon for Access2007

Source: Internet
Author: User

Create an application-level custom Ribbon for Access2007

(i) Create a Access2007 application-level custom Ribbon

1, open the Access2007, opened an existing database or create a new database.

2, click Office Button, click Access Options, and then click the Advanced tab.

3, in the General section, select the option "Show Add-in user Interface Error" (this option may be in a different location in different applications).

4, click OK to close the Access Options dialog box.

Next, create a table that contains the custom XML tags.

5. In Access2007, right-click the Navigation Pane, click Navigation Options, and select the check box before displaying system objects. (Unless you set this option, you will not be able to view the USysRibbons table in the Navigation Pane.) Click the OK button, and the Access system table appears in the Navigation Pane.

6, on the Create tab, click Table Design.

7, add the following fields to the table.

Tables: Fields defined in the USysRibbons table

Field name data type

ID Auto Number

Ribbonname text

Ribbonxml notes

8. Select the ID field and select Primary key on the Design tab.

9, click the Office Button, and then click Save to name the new table USysRibbons.

10. Right-click the USysRibbons tab, and then click Datasheet view.

11, add the following data to the field you created.

Table: USysRibbons table Data

Field Name value

ID (AutoNumber)

Ribbonname Hidedata

Ribbonxml Xml

<customui xmlns= "Http://schemas.microsoft.com/office/2006/01/customui" >

<ribbon 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>

This tag sets the startFromScratch property to False, and then hides the built-in Create tab. Next, create a custom tab and custom group, and add the built-in paste controls to the group.

12, close the table.

13. Close and reopen the database.

14, click Office button, and then click Access Options.

15, click the Current Database tab, and scroll down to the Ribbon and Toolbar Options section.

16. In the "Ribbon name" Drop-down list, select Hidedata and click the OK button.

17. Close and reopen the database.

At this point, the Create tab is no longer in the ribbon, and the Fluent UI includes the A Custom tab tab, which contains the a custom group group with the built-in Paste button.

18. To restore the ribbon, you need to open the Access Options dialog box, remove the contents of the Ribbon name option, and then close and reopen the database, at which point Access2007 will display its default fluent UI.

Note: You can also use a ribbon from the USysRibbons table to provide the UI for the specified form or report. To do this, open the form or report in design or layout mode, and then set the form's Ribbonname property to the name of the ribbon you want to use. Before setting this property, you must select the form itself, not any controls or selections in the form.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.