Color scheme: Light
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library how-to guides » How to: Show only your own category in the navigation pane

How to: Show only your own category in the navigation pane

Make the navigation pane show your category and nothing else: no unassigned objects, opened on your category, and locked so that objects can't be deleted or renamed.

Requires WKL Forms Object Library 1.50 or later.

Solution overview

The WklNavPane model hides the group of unassigned objects (Hide unassigned objects, on by default), names the group that the pane opens with (Start group), and can lock the pane (Lock). Applying the model shows the category; Access remembers the selection when the database closes, so the pane opens on it again.

Implementation

In the navigation pane designer, on the Category page, leave Hide unassigned objects on, choose a Start group (or leave it empty for the whole category), and turn on Lock. Then click OK.

To do the same without the designer:

Dim pane As Object
Set pane = CreateObject("WklForms.NavPane")
pane.Save "{ ""version"": 1, ""category"": ""Data Source"", ""defaultGroup"": ""Master Data"", ""lock"": true," & _
          " ""groups"": [ { ""name"": ""Master Data"", ""entries"": [ { ""kind"": ""form"", ""object"": ""frmCustomers"", ""label"": ""Customers"" } ] } ] }"

To hide the pane completely in the delivered application, clear Display Navigation Pane under File › Options › Current Database (the database property StartUpShowDBWindow).

Remarks

  • The built-in Access categories (Object Type, Tables and Related Views, Custom) stay in the pane's category list; WklNavPane doesn't change them. The pane opens on yours: when the database closes, Access remembers the category and group it showed last and opens with them again.
  • The lock comes from DoCmd.LockNavigationPane, which, according to the Access documentation, lasts for the current session. A model with Lock locks the pane each time it's applied, so apply it at startup to lock the pane in every session.
  • Access shows hidden groups dimmed when its Show Hidden Objects option is on (a per-user Windows setting that developers often turn on). Users without that option don't see them at all.
  • Locking and hiding are conveniences, not security: code can still open the objects.
en/wiki/msaccess/comctl/how-to/show-only-your-own-category-in-the-navigation-pane.txt · Last modified: by Wolfgang van der Stille