DoCmd.NavigateTo method (Access)
You can use the NavigateTo method to control the display of database objects in the navigation pane.
expression.NavigateTo (Category, Group)
expression A variable that represents a DoCmd object.
|Category||Optional||Variant||The category by which you want the navigation pane to display objects.|
|Group||Optional||Variant||Determines which objects in the category appear in the navigation pane. If you leave this argument blank, the navigation pane will display all database objects grouped by the criteria that you specify in the Category argument. Examples of valid Group arguments for the various Category arguments are shown in the table under Remarks.|
For example, you can change how the database objects are categorized, and you can filter the objects so that only certain ones are displayed.
This action is similar to selecting categories and groups from the title bar of the navigation pane.
Valid Group arguments depend on which Category argument is used. If you enter an invalid Group argument, an error message appears.
The following table contains examples of valid Group arguments for each Category argument.
|Category argument||Example Group arguments|
|Object Type||Tables, Forms, Queries, Pages, Macros, Modules|
|Tables and Views||Names of specific tables in your database|
|Modified Date||Today, Yesterday, Last Month, Older|
|Created Date||Today, Yesterday, Last Month, Older|
|Custom Category||Names of groups that you have created for the specified custom category|
To navigate to the top level of a category (for example, All Tables, All Access Objects, or All Dates), you must leave the Group argument blank. For example, when the Category argument is Object Type, entering All Access Objects as a Group argument results in an error.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.