In Access 2007, Microsoft introduced AutoFormats, which made it easy to change the look and feel of a form or report to a predesigned set of fonts, colors, and backgrounds. When you applied an AutoFormat to a form or report in Access 2007, however, the changes applied only to that specific object. If you wanted to apply the same AutoFormat to all forms and reports, you needed to open each form and report separately and apply the AutoFormat to each individually. If you decided to change to a different AutoFormat at a later time, you needed to open each individual form and report and apply a new AutoFormat. Performing this task manually in a database with many objects could be very time-consuming. One other drawback with AutoFormats is that you cannot customize the colors and fonts.
Access 2010 introduces a new feature called themes to quickly change the colors and fonts used by your forms and reports. For those of you familiar with Access 2007, you might be a little confused by the terminology, because there were Access Theme Colors in the color picker dialog box in Access 2007. The Access Theme Colors were designed to make it easy to create an Access 2007 database that blended well with the Windows operating system or with other Office applications. In Access 2010, the color picker dialog box for properties that support color displays Theme Colors, as shown in Figure 14-61.
When you select colors from the Theme Colors section of the color picker dialog box, Access enters the name of the theme color on several properties on the Property Sheet window. You can think of the theme as a collection of fonts and colors. Access uses the theme color to control what color to display for the form or report element. Access provides 12 theme colors—Background 1, Text 1, Background 2, Text 2, Accent 1 through Accent 6, Hyperlink, and Followed Hyperlink. In Figure 14-61, you’ll notice that each color has lighter tints and darker shades of the base theme color. The different tints and shades are represented as a percentage lighter or darker than the base color. Access lists five color variations in each column for the base theme color. If you hover your mouse over any of these colors, Access displays a tooltip of the theme color name and any percentage lighter or darker.
To demonstrate the value of using themes in your Access databases, open the Contacts Map Copy sample web database (ContactsMapCopy.accdb) found on the companion CD. (Note that although we’ll only show an example of using themes here with a web database, you can use this feature with client databases as well.) When the web database opens, Access displays the startup form called Home. This small contacts web database has four web forms and two web reports to add, edit, and display contact information. All the forms and reports in this web database were created using the Office theme, which uses various shades of blue for color and the Calibri (Detail) font. Switch to Layout view for the Home form and then click the Themes command in the Themes group on the Design tab. Access displays the Themes gallery, as shown in Figure 14-62.
Under the category In This Database, Access lists any themes that are currently saved with the database application. Access highlights the theme currently in use by the object you have open. Under the category Built-In, Access lists 40 built-in themes for Access 2010. You can choose from any of these themes to quickly apply a standardized look for your entire application or a specific form or report. The 40 themes you see in the gallery are also shared by the other Office 2010 applications so your Access application can easily have the same theme style as your Excel spreadsheets, Word documents, or your Microsoft PowerPoint presentations.
At the bottom of the Themes gallery, you’ll see three options—Enable Content Updates From Office.Com, Browse For Themes, and Save Current Theme. When you click the Enable Content Updates From Office.Com option, Access automatically updates the Themes gallery options when new content becomes available. Updating the content occurs only if you have an active Internet connection established. Click the Browse For Themes option to browse for other theme files on your computer or on your local intranet if you are on a corporate domain. Theme files have a .thmx file extension. Click Save Current Theme to save a copy of the current theme to your computer.
You won’t see the Enable Content Updates From Office.Com option on the Themes gallery if you have already selected the Connect To Office.Com For Updated Content When I’m Connected To The Internet option in the Privacy Options category of the Access Options dialog box.
As you hover your mouse over any of the 40 built-in themes, Access shows you the theme’s name and gives you an instant preview, called Live Preview, of what your changes will look like by changing the fonts and colors on the form or report you have open. Let’s try one of these other themes so you can see how easy it is to change the entire look and feel of your application. Click the Black Tie theme button to change the theme for the database. Access changes the theme and you’ll immediately see the difference with new fonts and colors being used on the form, as shown in Figure 14-63.
If you want to disable Live Preview, click the File tab on the Backstage view, click Options, and then clear the Enable Live Preview option on the General category of the Access Options dialog box. When you clear this option, you will no longer see the instant previewing of theme colors and fonts when you hover over the theme styles in the Themes gallery.
Figure 14-63. When you click a theme button, Access changes the fonts and colors of your form to match the theme styles.
The shades of blue color found on many areas of the form are now replaced with shades of gray. The font for the controls has also been changed from Cambria and Calibri to Garamond. If you close the form now, you’ll notice Access does not prompt you to save any changes to your form. If you open any of the other three forms or the two reports in this web database, you’ll notice that Access applies the new theme to all these objects as well. If you open the web table or the two web queries in Datasheet view, you can even see that Access applied the new fonts and colors there, too. With one click, you’ve changed the entire look of the application. You can easily try different themes and see how they look without a lot of work manually making adjustments to all the objects in your database.
Changing the theme of all the objects in the database at one time is a big time saver, but what if you wanted to have a specific form or report be unique, with its own theme? Access also allows you to apply a different theme to a specific form or report. Open the frmContactsList form in Layout view, click the Design tab, click the Themes button in the Themes group, and then right-click the Office theme gallery button under Built-In, as shown in Figure 14-64.
Access displays a shortcut menu of options. If you click Apply Them To All Matching Objects, Access applies the selected theme to any other objects in the database that also have the same theme applied. For example, if two forms in your database use the Apex theme and you click this option to apply a new theme to matching objects, Access changes the theme for the current form as well as the other form that also uses the Apex theme. If you click Apply Theme To This Object Only, Access applies the selected theme only to the object that currently has focus. Click Make This Theme The Database Default to make the selected theme the default for any new objects you create in the database. Click the last option, Add Gallery To Quick Access Toolbar, to create a command in the Quick Access Toolbar that opens up the Themes gallery.
For our example, click Apply Theme To This Object Only, as shown previously in Figure 14-64. Access changes the theme for the frmContactsList form back to the Office theme color of blue. If you open the other forms or reports in this database, you’ll notice that the other objects still have the Black Tie theme applied. If you drop down the themes gallery again, you’ll notice Access now displays two themes under In This Database, as shown in Figure 14-65. If you hover your mouse over the Office Theme option, Access displays the specific name of the form that uses the theme in a tooltip. If you assign this theme to more than one object, Access displays the names of all the objects in the tooltip.
In addition to using one of the built-in themes for Access, you can customize your own theme fonts and colors. Click the Colors command in the Themes group and Access displays the different colors used in the built-in themes, as shown in Figure 14-66. If you right-click one of the color options, Access displays three options—Apply Color Scheme To All Matching Objects, Apply Color Scheme To This Object Only, and Add Gallery To Quick Access Toolbar. These options have similar functionality as the options you saw previously when right-clicking a theme.
At the bottom of the Colors gallery, Access displays an option called Create New Theme Colors. Click this option, and Access opens the Create New Theme Colors dialog box, as shown in Figure 14-67. Under Theme Colors, Access lists the 12 colors you can modify for themes. You can click the down arrow next to the color button to choose a color from the color picker, or create a custom color. Under Sample, Access displays a preview of what your color choices will look like on a form or report. In the Name text box, you can enter a name for your new custom theme colors. Click Reset to reset all the theme colors to their defaults.
When you save new custom theme colors, Access displays those theme colors under a new category called Custom in the Colors gallery, as shown in Figure 14-68. You can apply your custom theme colors to any forms and reports in the database you are working on. You’ll also see your new custom theme colors option displayed in the Colors gallery for any databases you work with on your computer. By default, Access stores your custom theme colors in the following folder (note that your file path might be different based on your operating system installation path):
C:\Users\<UserName>\AppData\Roaming\Microsoft\Templates\Document Themes\Theme Colors
You can also create your own custom font choices for a theme. Click the Fonts button in the Themes group, and Access displays the different fonts used in the built-in themes, as shown in Figure 14-69. If you right-click one of the font options, Access displays three options—Apply Font Scheme To All Matching Objects, Apply Font Scheme To This Object Only, and Add Gallery To Quick Access Toolbar. These options have similar functionality as the options you saw previously when right-clicking a color theme.
At the bottom of the Fonts gallery, Access displays an option called Create New Theme Fonts. Click this option, and Access opens the Create New Theme Fonts dialog box, as shown in Figure 14-70. Under Heading Font, you can select a font for Access to use in places where headings are needed, for example, in a title label in the Header section for a form or report. Under Body Font, you can select a font for Access to use in most controls found in the Detail section of forms and reports. Under Sample, Access displays a preview of what your font choices will look like on a form or report. In the Name text box, you can enter a name for your new custom theme fonts.
When you save new custom theme fonts, Access displays those theme fonts under a new category called Custom in the Fonts gallery, as shown in Figure 14-68. As with custom theme colors, you can apply your custom theme fonts to any forms and reports in the database you are working on. You’ll also see your new custom theme font option displayed in the Fonts gallery for any databases you work with on your computer. By default, Access stores your custom theme fonts in the following folder (note that your file path might be different based on your operating system installation path):
C:\Users\<UserName>\AppData\Roaming\Microsoft\Templates\Document Themes\Theme Fonts
You can also save an entire custom theme by clicking the Theme command in the Themes group, and then clicking the Save Current Theme option, shown previously in Figure 14-64. By default, Access stores custom themes in the following folder (note that your file path might be different based on your operating system installation path):
C:\Users\<UserName>\AppData\Roaming\Microsoft\Templates\Document Themes
Figure 14-72. Access displays any custom themes stored on your computer under the Custom category in the Themes gallery.
If you want to delete a custom theme from the Themes gallery, you can right-click the custom theme and click Delete. Access prompts you for confirmation before deleting the custom theme file. Be aware, however, that Access permanently deletes the custom theme file from your hard drive. You cannot undo this action nor recover the file from the computer’s Recycle Bin. Before moving on to the next section, change the theme back to Office for the Contacts Map Copy sample web database.
If you don’t want an element of your form or report, such as a command button or text box, to change color when you change a theme, assign a specific standard color to that element on the Property Sheet window instead of using a Theme color. When you change themes, Access keeps the standard color for the element instead of adjusting the color to the new theme.