Color scheme: Light
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library troubleshooting » The navigation bar opens in another mode than designed

The navigation bar opens in another mode than designed

A form with a WklNavBar opens with the icon column even though the bar was designed expanded, or with a different width, or with groups collapsed, and changing the design doesn't seem to have any effect. Other users see the design as intended.

Environment

WKL Forms Object Library 1.24 and later, with AutoSaveLayout on (the default); Access forms and Excel or Word UserForms.

Cause

The bar remembers what each user did with it (mode, width, pinning, and collapsed groups) per Windows user under LayoutKey (default “form name.control name”), in the front end's local USysWklLayout table or, on UserForms, in the registry. When the form opens, the remembered state takes precedence over the design. Changes made in code count too: a Mode set in Form_Load is remembered.

An unpinned bar that's designed expanded always opens as the icon column, because a form never opens with the bar lying over the page.

Resolution

  1. To return to the design for the current user, call Me!navMain.Object.Reset (for example, behind a “Default view” button); this also removes the remembered row.
  2. To make the design always win, turn off Remember the state per user (on the designer's Behavior page) or set AutoSaveLayout to False.
  3. To set a mode in code without it being remembered, set it before the form is shown (Form_Open) with AutoSaveLayout off, or reset the state at the end of the session.
en/wiki/msaccess/comctl/troubleshooting/navigation-bar-opens-in-another-mode.txt · Last modified: by Wolfgang van der Stille