Access.2007.VBA.Bibl..

(John Hannent) #1

Customizing the Ribbon with XML in Access Databases and Add-ins 15


The following screen shot shows the USysRibbons table in datasheet view, with the record for the
ListFields Ribbon visible:


The USysDBRibbons table in datasheet view.


For more exhaustive coverage of XML, see Wrox’s Beginning XML.
CROCROSSSS-REF-REF

Although you can edit the XML code directly in the Access USysRibbons table (use Ctrl+Enter to
go to a new line), it’s a lot easier working with it in an XML editor, such as the one in VB 2005
(standard or Express), or the XML Notepad 2007 utility. Figure 15.4 shows what the same code
looks like in the XML Notepad 2007 editor, after opening the code saved as Ribbon.xml.

IntelliSense doesn’t work for Access Ribbon XML code in Visual Basic 2005 Express, but
it does work in Visual Studio 2005.

It is much easier to work with XML code in the XML Notepad 2007 or the Visual Studio 2005 edi-
tor. In the XML Notepad 2007 editor, you have a TreeView pane on the left, and each attribute is
shown with its matching value in the right pane; in the Visual Studio 2005 editor, the components
are color-coded and you have IntelliSense to aid in creating code. Bracket matching (see the
shaded <tabs>and </tabs>names in the figure) also helps, in case you started a bracketed
code segment and forgot to end it. For XML code in the Visual Studio 2005 editor, the colors have
the meanings listed in Table 15.3.

NOTENOTE

Free download pdf