Chapter 26: Bulletproofing Access Applications
929
a form from the form’s BeforeUpdate event instead of individually checking each and every
control on the form.
Using the /runtime option
If you’re not concerned with protecting your application, and you just want to prevent users from
mistakenly breaking your application by modifying or deleting objects, you can force your applica-
tion to be run in Access’s runtime mode. When a database is opened in Access’s runtime mode, all
the interface elements that allow changes to objects are hidden from the user. In fact, while in run-
time mode, it’s impossible for a user to access the Navigation pane.
When using the runtime option, you must ensure that your application has a start-up form that
gives users access to any objects you want them to access. Normally, this is the main menu or main
switchboard of your application.
Tip
To assign a form as a start-up form, open the database that you want to use, click the Microsoft Office button,
select Access Options, and select the Current Database tab. Under Application Options, set the Display Form
drop-down list to the form you want to be the start-up form for the application. Start-up forms are covered in
more depth in the “Making a splash with a splash screen” section, earlier in this chapter.
Earlier in this chapter, in the “Making the application easy to start” section, you read how to create
a Windows shortcut that launches an Access application. Forcing runtime behavior in Access is
quite easy. Simply add the /runtime switch after the reference to the database file in the shortcut
properties, as shown in Figure 26.17.
FIGURE 26.17
Adding the /runtime switch to a shortcut