Version 3.41 Updated 19/07/2019
This example shows how the Access application interface can be controlled in various ways
Some of these methods can be used to help make a database more secure.
The database is opened with a form 'floating independently' on the desktop i.e. with the access application window hidden
Buttons on the form can be used to:
• drag a borderless form to a new position
show / hide entire Access application window
show / hide navigation pane
show / hide ribbon
show / hide taskbar
maximise the form to fill the entire screen (no title bar & no taskbar) - this only works for a popup form
open another form with a related report. This shows how the print preview ribbon can be displayed whilst the report is open & hidden when it is closed
open / close the Visual Basic Editor (VBE)
Although it is highly unlikely that any single application would need to use all of these features, this is designed to show that all items can be toggled on / off independently without problems.
All code has been fully tested in Access 2010 & 2016 (32-bit & 64-bit) and has been widely used in various production databases for several years.
The code used can be found in the modules:
modDatabaseWindow / modNavPaneTaskbar / modRibbon
Some of the code is widely known e.g. hide navigation pane / ribbon.
Other parts are written by myself or other authors. Where appropriate, those authors have been acknowledged.
This example database also includes:
code to resize forms for any screen size & resolution in module modResize
additional functions in module modDesignFeatures
If you wish to use any of the code in your own projects, just copy the relevant module code including all author information as supplied
The VBA reference Visual Basic for Extensibility is required for certain additional functions listed in the module modDesignFeatures
e.g. CloseAllVBEWindows and for getting the procedure names in error handling code.
It can be omitted if you don't wish to use either of these
v2 09/05/2018 - added code to shows ways of running a query with the application interface hidden
v3 02/01/2019 - added code to open a report with the application interface hidden
13/02/2019 - fixed an issue in 64-bit Access
04/04/2019 - added code to allow form to be dragged using mouse down event
19/07/2019 - modified code to prevent application window being restored after clivcking on taskbar icon
Download SetWindows v3.41 (zipped - approx 2.0 MB)
Click the image to view a larger version ...