Customize and lock the Navigation Pane

You can improve the usability of a database by customizing and controlling the contents and organization of the Navigation Pane. Custom navigation can help improve efficiency by grouping, highlighting, or hiding objects. This article documents ways that you can customize and control the Navigation Pane to improve usability by making it easier for users to find just the database objects they need to use.

This article does not document database security features, such as encrypting a database with a password. For more information, refer to the See Also section.

In this article


Overview

Located along the side of the screen, the Navigation Pane provides an interface for the objects (database objects: An Access database contains objects such as tables, queries, forms, reports, pages, macros, and modules. An Access project contains objects such as forms, reports, pages, macros, and modules.) in your database, and provides several features that help you to customize the user experience.

Navigation pane Northwind 2007

In the Navigation Pane, items are arranged into groups. You choose how to group the items by specifying a category, such as Object Type or Created Date. The preceding illustration depicts the All Access Objects group of the Object Type category, with some of the object type groups, such as Tables and Queries, closed.

Custom categories and groups

You can also create custom categories, and custom groups within those categories. In the custom groups, you can then create shortcuts that point to database objects.

For example, suppose you have many reports in your database, and that you run the reports with varying frequencies, such as daily or quarterly. You might create a Reports category, and then create Daily, Weekly, Monthly, Quarterly, and Yearly groups. In each group, you could then create shortcuts to the appropriate reports.

 Tip   You can create multiple shortcuts to a database object, each shortcut in a different custom group.

Showing or hiding categories and groups

You can use the Navigation Options dialog box to show or hide some of the categories and groups in the Navigation Pane.

You can also use macro actions (action: The basic building block of a macro; a self-contained instruction that can be combined with other actions to automate tasks. This is sometimes called a command in other macro languages.) to control the display of Navigation Pane categories as a database opens in Access. These new macro actions are available in Microsoft Office Access 2007:

  • SetDisplayedCategories    Use this action to show or hide a category. You can show or hide only one category each time you use this action. However, you can use this action multiple times in a macro to show or hide individual categories as needed.
  • LockNavigationPane    Use this action to lock the Navigation Pane. Doing this helps prevent users from accidentally adding, moving, or deleting items in the Navigation Pane.

 Note   Locking the Navigation Pane does not prevent users from copying database objects to the clipboard.

Navigating to a category or group automatically when the database opens

You can use the NavigateTo macro action to navigate to a category or group. If you use this macro action in the autoexec macro, you can automatically navigate to a category or group when the database opens.

Disabling Design view

The items that are displayed in your custom categories and groups are actually shortcuts that point to database objects.

Shortcuts in the Navigation Pane have a Disable Design View shortcuts property that you can set. Right-click the shortcut, click either Object Properties or (for a table) Table Properties on the shortcut menu, and then select the Disable Design View shortcuts check box. If this property is enabled, the shortcut cannot be used to open its target object in Design view or Layout view. For example, if you enable this property for a shortcut to a form, users cannot change the design or layout of the form by using the shortcut.

Hiding database objects

The built-in categories and groups in the Navigation Pane do not display shortcuts, and instead display actual database objects. These groups include:

  • All groups in any built-in category.
  • The Unassigned Objects group of any custom category.

Database objects do not have a Disable Design View shortcuts property. You can hide database objects to help prevent design changes, and then provide shortcuts to them in custom categories and groups.

Before you begin

By using a combination of these features, you can effectively control the organization of the Navigation Pane to improve usability. However, these features will not prevent a malicious user from making unwanted design changes to your database. Moreover, these features will not prevent unauthorized access to data. Consider the following:

Usability features can be bypassed.    

  • If you use a macro to control and lock the Navigation Pane, remember that users can disable the macro at startup by pressing and holding the SHIFT key.
  • Although Navigation Pane shortcuts have a Disable Design View shortcuts property, database objects themselves do not. You can hide the categories and groups that contain database objects and you can hide the objects themselves, but it is possible for users to unhide them.

Focus on the user.    

  • When you plan and design the navigation system for a database, work with the people who will use it. If it is not practical to work with the specific people who will use a database, keep their needs central to your design process.
  • Depending on your resources, consider using focus groups for planning, and conducting usability tests during design.

Security is not the goal.    

  • Your goal in implementing these features to control the Navigation Pane should be to improve the usability of a database. These features are not designed to help secure a database.
  • For more information about ways to help secure a database, refer to the See Also section.

Top of Page Top of Page

Customize the Navigation Pane

You can use the Navigation Options dialog box to customize the Navigation Pane.

Navigation Options dialog box

The process follows these broad steps:

  1. Create a custom category. Access provides one pre-built custom category for you: Custom. You can rename that category and add or remove groups to suit your needs. You can also create new custom categories.
  2. Create a custom group. After you create a category, you create one or more custom groups for the new category.
  3. Assign objects to the custom group by creating shortcuts. In the Navigation Pane, you drag or copy and paste the database objects that you want to assign to your custom group. You drag or copy the objects from a special group in your new category called Unassigned Objects, which Access creates for you whenever you create a custom category.

 Notes 

  • When you add a database object from the Unassigned Objects group to your custom group, Access creates a shortcut to that object — you are not moving or copying the object itself.
  • If you rename or delete a shortcut in a custom group, those changes do not affect the actual object, only the shortcut to it.
  • You can create as many shortcuts to a database object as you want. Each group should have only one shortcut to a given database object.
  1. Show or hide groups or objects in a custom category. After you populate your custom group or groups, you can hide the Unassigned Objects group and any other groups that you don't want to display. You can also hide individual objects.

 Note   You can also use the SetDisplayedCategories macro action to show or hide a category. By using a macro, you can show or hide categories regardless of the settings in the Navigation Options dialog box. For more information, see the section Control the Navigation Pane by using a macro.

Create a custom category

  1. Right-click the menu at the top of the Navigation Pane and then click Navigation Options.
  2. In the Navigation Options dialog box, under the Categories list, click Add Item.

A new category appears in the list. This figure illustrates a new custom category:

A new custom category in the Navigation Pane

  1. Type a name for the new category and then press ENTER.

 Tip   Try to create a name that makes sense to the people who use your database. After you create the name, notice that the caption for the list on the right changes to match that name. For example, if you name the new category My Switchboard, the caption in the list on the right reads Groups for "My Switchboard". Also, notice that the list contains a group called Unassigned Objects. Access creates that group by default. This group contains all of the objects in your database, and you use those objects to populate your custom group.

After you create your custom category, you create one or more groups for that category. You can create as many groups as you need. Keep the Navigation Options dialog box open and follow the next steps.

Create a custom group

  1. Under the Groups for "Group Name" list, click Add Group and then type a name for the group. You can repeat this process as often as you need. For example, My Switchboard might contain three groups — Data Entry Forms, Reports, and Queries. The needs of your users or your own preferences should determine the groups that you add.
  2. Leave the check box next to Unassigned Objects selected, and then click OK.

Access closes the Navigation Options dialog box and adds your new custom group to the Navigation Pane, but you cannot yet see the new group.

  1. Go to the next set of steps to make the new group visible and to add objects to the group.

 Tip   If you just want to add an item to a new custom group, right-click the item and then, on the shortcut menu, point to Add to group and then click New Group.

Assign objects to the custom group by creating shortcuts

  1. Click the menu at the top of the Navigation Pane and, in the upper section of the menu, click your new category.

The group or groups that you created for your category appear in the lower section of the menu, along with the Unassigned Objects group.

  1. Drag items from the Unassigned Objects group to a custom group.

To move multiple items at once, hold down CTRL while you click the items, and then drag the items to a custom group.

Show or hide groups and objects in a custom category

You can hide some or all of the groups in a custom category and some or all of the objects in a group. Remember these facts as you proceed:

  • Access provides two ways to hide items. You can use commands that are provided by the Navigation Pane to hide a shortcut in a group, or you can set a database object's Hidden property to hide shortcuts to the object in all the groups and categories in the open database, including built-in categories and groups.
  • You can make hidden objects and groups completely invisible, or you can display them in the Navigation Pane as dimmed, unavailable icons. You do this by selecting or clearing the Show Hidden Objects check box in the Navigation Options dialog box. You also use that check box when you need to unhide, or restore, a group or an object.

The steps in the following sections explain how to perform each task.

Hide a group in a category

  • In the Navigation Pane, right-click the title bar of the group that you want to hide, and then click Hide.

 Note   You can also hide a group by using the Navigation Options dialog box. Open the dialog box (see the steps in the next section if you don't know how) and, in the Groups for "category" list, clear the check box next to the group that you want to hide.

Restore a hidden group to a category

  1. Right-click the menu bar at the top of the Navigation Pane and then click Navigation Options on the shortcut menu.
  2. In the Categories list, select the category that contains the hidden group.
  3. In the Groups for "category" list, select the check box next to the hidden group.
  4. Click OK.

Hide a shortcut or object only in its group

  • In the Navigation Pane, right-click the shortcut or object, and then click Hide in this Group.

 Note   This command is not available for objects in the Unassigned Objects group of a custom category.

Hide an object from all categories and groups

  1. Right-click the object that you want to hide, and then click Object Properties or (for a table) Table Properties on the shortcut menu.

The Object_name Properties dialog box appears, and Access appends the name of the object to the dialog box title. For example, if you open a form called Orders, the dialog box title displays Orders Properties. The following figure shows the dialog box.

The Properties dialog box for a database object in Access

  1. Select the Hidden check box.
  2. Click OK.

Restore (unhide) a hidden object

  1. Right-click the menu at the top of the Navigation Pane and click Navigation Options on the shortcut menu.
  2. Under Display Options, select the Show Hidden Objects check box.
  3. Click OK and return to the Navigation Pane.

The pane shows a dimmed icon for all hidden objects.

  1. Do one of the following:
    • If you hid a shortcut in a group, right-click the shortcut and then click Unhide in this Group.
    • If you hid an object from all categories and groups by setting the Hidden property, right-click the object, click Object Properties or (for a table) Table Properties, and then clear the Hidden check box.

Remove and restore shortcuts in custom groups

Your custom groups may change over time, as user and business demands change. You can add or remove the shortcuts in a group at any time.

Remove a shortcut from a custom group

  • In the Navigation Pane, right-click the shortcut that you want to remove, and then click Remove.

Restore a shortcut to a custom group

  1. If the Unassigned Objects group is hidden, display it.

ShowHow do I display the Unassigned Objects group?

  1. Right-click the menu at the top of the Navigation Pane and click Navigation Options on the shortcut menu.
  2. In the Groups for "category" pane, select the check box next to Unassigned Objects.

  1. As needed, drag or copy and paste the object that you want from the Unassigned Objects group to your custom group.

Rename a shortcut in a custom group

  1. In the Navigation Pane, right-click the shortcut that you want to rename, and then click Rename Shortcut.
  2. Type the new name for the shortcut and then press ENTER.

Top of Page Top of Page

Control the Navigation Pane by using a macro

Access 2010 provides several macro actions that you can use to control the Navigation Pane. You can use a macro action to do any of the following:

  • Selectively show or hide categories
  • Lock the Navigation Pane to help prevent accidental changes
  • Navigate to a category or group
  • Hide the Navigation Pane

These actions can be used at any time. You can add them to an existing macro or create a new macro for them. For more information about creating macros to control the user interface, see the article Create a user interface (UI) macro.

 Tip    To run macro actions automatically when a database opens, put the actions in a macro named autoexec.

Use macro actions to control what the Navigation Pane displays

  1. Do one of the following:
  • To create a new macro, on the Create tab, in the Macros & Code group, click Macro.
  • To add the actions to an existing macro, right-click that macro in the Navigation Pane, and then click Design View.
  1. On the Design tab, in the Show/Hide group, click Show All Actions.
  1. In the macro designer, select SetDisplayedCategories from the drop-down list. The action appears in the macro designer.
  2. In the Show box, choose a setting. Choose Yes if you want the category to display in the Navigation Pane. Choose No if you do not want the category to display in the Navigation Pane.
  3. In the Category box, and then click the name of the category that you want to show or hide.
  4. Repeat steps 3 through 5 for each category that you want to control by using the macro.
  5. In the macro designer, select LockNavigationPane from the drop-down list. The action appears in the macro designer.
  6. Specify a value for the Lock argument. Choose Yes to lock the Navigation Pane.

Use a macro action to navigate to a category or group

  1. Do one of the following:
  • To create a new macro, on the Create tab, in the Macros & Code group, click Macro.
  • To add the action to an existing macro, right-click that macro in the Navigation Pane, and then click Design View.
  1. On the Design tab, in the Show/Hide group, click Show All Actions.
  1. In the macro designer, select NavigateTo from the drop-down list. The action appears in the macro designer.
  2. In the Category box, click the name of the category that you want to navigate to.
  3. If you want to navigate to a specific group in the category, click the arrow in the Group box, and then click the name of the group that you want to navigate to.

Use a macro action to hide the Navigation Pane

If you prefer to create your own navigation system, you can hide the Navigation Pane by using the RunCommand macro action and the WindowHide argument.

  1. Do one of the following:
  • To create a new macro, on the Create tab, in the Macros & Code group, click Macro.
  • To add the action to an existing macro, right-click that macro in the Navigation Pane, and then click Design View.
  1. On the Design tab, in the Show/Hide group, click Show All Actions.
  1. In the macro designer, select RunMenuCommand from the drop-down list. The action appears in the macro designer.
  2. In the Command box, select WindowHide.

 Note   You can also turn the display of the Navigation Pane on or off by using the Display Navigation Pane check box in the Access Options dialog box. If you use the RunMenuCommand macro action with the WindowHide argument, it will hide the Navigation Pane whether the Display Navigation Pane check box is selected or cleared.

Top of Page Top of Page

Disable Design view for an item

In the Navigation Pane, you can set a shortcut's Disable Design View shortcuts property to control whether users can use the shortcut to open the target object in Design view or Layout view.

  1. In the Navigation Pane, right-click the shortcut for which you want to disable Design view, and then click Object Properties or (for a table) Table Properties.
  2. In the Object_name Properties dialog box, select the Disable Design View shortcuts check box.

Top of Page Top of Page

Hide a database object

  1. Right-click the object that you want to hide, and then click Object Properties or (for a table) Table Properties.

The Object_name Properties dialog box appears, and Access appends the name of the object to the dialog box title. For example, if you open a form called Orders, the dialog box title displays Orders Properties. The following figure shows the dialog box.

The Properties dialog box for a database object in Access

  1. Select the Hidden check box.
  2. Click OK.

Restore (unhide) a hidden object

  1. Right-click the menu at the top of the Navigation Pane and click Navigation Options on the shortcut menu.
  2. Under Display Options, select the Show Hidden Objects check box.
  3. Click OK and return to the Navigation Pane. The pane shows a dimmed icon for all hidden objects.
  4. Do one of the following:
    • If you hid a shortcut or object only from a group, right-click the object and then click Unhide in the Group.
    • If you hid an object from all categories and groups by setting the Hidden property, right-click the object, click View Properties, and then clear the Hidden check box.

Top of Page Top of Page

 
 
Applies to:
Access 2010