How to: Take over a category arranged in Access
Turn a custom category that someone arranged by hand in the navigation pane into a model, so that you can keep it under version control, rebuild it, and edit it in the designer.
Requires WKL Forms Object Library 1.50 or later.
Solution overview
WklNavPane.ReadCategory reads a custom category of the pane (its groups in order, hidden groups,
shortcuts with their display names, and whether the group of unassigned objects is hidden) and
returns it as a model. The designer's Take over page does the same in one click.
Implementation
In the navigation pane designer, on the Take over page, select the category and click Take over. Check the result on the Groups and entries page, choose a Start group, and click OK.
To do the same in code:
Dim pane As Object, model As String
Set pane = CreateObject("WklForms.NavPane")
Debug.Print pane.Categories ' for example: Custom;Administration
model = pane.ReadCategory("Administration")
pane.Save model
Remarks
- Taking over replaces the model; the conditions and the start group start out empty.
- Shortcuts to objects that no longer exist in the database are left out.
- After you save, the model owns the category: the next
Applywrites it as the model describes it and replaces any later changes made by hand in the pane. Make changes in the designer instead.
Related topics
en/wiki/msaccess/comctl/how-to/take-over-a-navigation-pane-category.txt · Zadnja sprememba: uporabnika Wolfgang van der Stille