A startup option doesn't take effect
Symptom
The application designer or WklApplication.Apply reports a changed startup option, for example
„AllowSpecialKeys = No (takes effect at the next opening)“, but Access still behaves as before:
Ctrl+G opens the VBA editor, the navigation pane is still shown, or Shift still skips the startup
form.
Environment
WKL Forms Object Library 1.51 or later, Microsoft 365 Access (including the runtime), ACCDB and ACCDE files.
Cause
Access reads most startup properties only when it opens a database. The title (AppTitle) and the
icon (AppIcon) take effect immediately; every other startup property (startup form, navigation
pane, status bar, full menus, shortcut menus, toolbars, special keys, and the Shift bypass) takes
effect from the next opening on. A copy made from the ACCDB file (an ACCDE file made by hand) also
carries the development options until EnsureApplication has run in it once.
Resolution
- Close the database and open it again.
- Make sure the startup form calls
EnsureApplication(see Tutorial: Set up the start of an application for its three modes), so that every copy writes the options for its mode. - For copies that must be correct the first time they open, build them with the build tool's
deploystep: the delivered file already carries the options for its mode (How to: Deliver an application for production). - Opening the database with Shift held down skips the startup form, and with it
EnsureApplication; that's the purpose of the bypass key during development. In administration and production, the model turns the bypass off.