Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 26: Bulletproofing Access Applications


911


FIGURE 26.9

Capture useful information on the login form.


The login information should also include the date and time the user logged in to the application.
You shouldn’t make the user enter this information, though. The built-in Now() function returns
the current system date and time and can be used in any logging features you build into the
application.

Confirm the user ID and password from the login form with data stored in a hidden table. You
could even include code to temporarily link to the password table in an “administration” database
that resides in another location on the network. Store the user ID from the login form in a global
variable to use in error logs, send e-mail messages, or stamp records with the user’s identification.

In any case, set the Modal property of the login form to Yes (True) to prevent the user from
accessing any other part of the application until the user ID, user name, and password have been
verified.

Tip
Use the predefined Password value for the Password text box’s InputMask property to display an asterisk
for each character entered into this box.


Although a simple login form such as the one you see in Figure 26.10 doesn’t deter a determined
hacker or sophisticated user, the average user will comply with the request for the user information
on this form. When used in conjunction with the BypassSetupKey property (which prevents
the user from using the Shift key to bypass the start-up options) described in the “Disabling start-
up bypass” section, later in this chapter, a startup form such as you see in Figure 26.10 provides a
reliable login procedure for most applications.

Making a splash with a splash screen
Although a splash screen (also called a start-up form) might not sound like a bulletproofing tech-
nique, one aspect of professional application development is providing high-quality information to
the user in a timely fashion. An appropriately designed splash screen gives the user such valuable
information as the version number of the database application, the user name (or login ID), the
date the database was most recently replicated, and so on. A simple splash screen is shown in
Figure 26.10.
Free download pdf