Microsoft Access 2010 Bible

(Rick Simeone) #1

Part IV: Professional Database Development


1016


FIGURE 29.8

A custom ribbon built for the Collectible Mini Cars database


Tabs

Label controls Drop-down control Button controls

This sample ribbon (Main2) was constructed by modifying a sample ribbon distributed by
Microsoft during the Access 2010 beta. You are almost always better off starting with a good exam-
ple ribbon than constructing a ribbon entire from scratch. You will find numerous examples of rib-
bons on the companion CD for this book. The Chapter29.accdb example database includes
more than 20 partial and complete ribbons for your experimentation and development.

Oddly enough, the default Access ribbon is inaccessible to developers. You cannot easily customize
the default Access ribbon. Instead, you have to build an identical ribbon from scratch and customize
your hand-built ribbon. As we discuss later in this chapter, it isn’t very difficult to construct a custom
ribbon entirely from built-in ribbon controls, but considerable time is required to identify the default
Access ribbon tabs, groups, and controls, and then reference those items from a custom ribbon.

Note
The Main2 ribbon (and, most of the other example ribbons in the Chapter29.accdb database) is configured
to add its tabs to the tabs already on the screen from the default Access ribbon. When you select Main2 from
frmSelectRibbon, notice that four new tabs appear instantly to the right of the tabs already displayed in
the Access ribbon. Moving off of frmSelectRibbon closes the Main2 ribbon, making it easy to see how a
custom ribbon influences the Access user interface.


Tabs
The Collectible Mini Cars ribbon contains four tabs: Collectible Mini Cars, Reports,
Administration, and Help. The main tab (Collectible Mini Cars) contains the operations most fre-
quently conducted by the Collectible Mini Cars application users, whereas the other tabs contain
less frequently used controls.

Groups
Each tab in the Collectible Mini Cars ribbon includes a number of groups. Figure 29.8 shows the
Collectible Mini Cars tab that contains the Home, Collectible News, Login, Orders, and Customers
groups. A tab can contain numerous groups, but you should take care not to overload a tab with
too many groups. It’s much better to add additional tabs as needed, rather than add so many
groups that a user is confused.
Free download pdf