Once upon a time you loaded your Access database, found the starting form (screen) and navigated between other related objects. Actually, this wasn’t always the case but general Microsoft Access users certainly engaged in this approach when designing a database leaving the end-user disorientated and de-motivated in utilising the firms application.
To help streamline your application making it user-friendly and more conducive to use, real database developers took advantage of the many properties in Access which included the form’s property sheet too.
In this article, I want to cover the 10 key properties required and when synchronised together it forms a smooth start-up screen environment as the Access form loads in a full screen mode removing any tempting and unwanted elements. This approach ends up with a polished and professional look and feel too which is highlighted with some simple but optional automation using Access VBA code and an auto macro.
Design your form adding all the components in the normal manner as if the form was manually called then save your changes before changing the key properties. In addition to the standard controls for your Access form, make sure you have added a ‘Close’ command button and is coded to close the form.
Next, let’s add the 10 key properties:
- Auto Resize – This property is set to ‘Yes’ and will automatically shape the form as it loads.
- Auto Center – This property is also set to ‘Yes’ and will sit dead centre should the form not fully load in a full screen view which maybe a desired effect should developers wish to change the size of a form. This will sit comfortably with the first property mentioned.
- Border Style – Set this property to ideally ‘Dialog’ though it can be also set to ‘None’ since it is going to be in a full screen view. The ‘Dialog’ option just follows the rules about when a screen has the focus user can optionally control moving and sizing of a form.
- Control Box – Set this property to ‘No’ to switch of the ability to show the control menu for a window (i.e. top left corner icon in a window).
- Min Max Buttons – Also set to ‘None’ to stop users from resizing the window to either a minimized, restore or maximized state.
- Close Button – Set this property to ‘No’ to switch off the ‘x’ icon in a window which of course will close the form. This must only be switched off if you have an alternative way to close a form (namely the command button mentioned earlier).
- Pop Up – This property is set to ‘Yes’ to make sure this form has the focus and viewed on top of any other previously opened form (if applicable).
- Modal – This must be set to ‘Yes’ and will behave as a real dialog box so that users cannot navigate away from this form until they use an alternative way to formally close the form.
- Caption – This property is the title bar caption which can be anything you like to display at the top of the form. I tend to use this for database title along with some clever coding to welcome the logged in user (if applicable) or just leave it blank.
- Allow Datasheet, PivotTable and Chart Views – All three properties deemed to be one collection here are set to ‘No’ as you only want to show the default view as set to ‘Single Form’.
Now the simple VBA code is to be attached to the loading form’s event (On Load) by adding DoCmd.Maximize in between the sub and end sub signature which will turn your form into a full screen view showing all the clean elements of the form in its full glory.
The final and optional part is to add a macro called ‘AutoExec’ (a specially reserved macro name) that triggers itself when the database file is loaded. In this macro, you add the ‘OpenForm‘ action to call your form.
Hopefully, you have the essentials in place to which you can now add further refinement to taste. Happy ever after!