Chapter 19: Advanced Access Form Techniques
703
in the Pages collection. If the second page is selected, the Value property returns 1 , and so on.
The page’s position within the collection corresponds to the value of the PageIndex property for
that page.A tab control can contain virtually any type of control, including text boxes, combo and list boxes,
option buttons and check boxes, and OLE objects. A tab control can even include other tab controls!
Although a form can contain multiple tab controls, it’s probably not a good idea to overload the user
by putting more than one tab control on a form. After all, the reason you use tab controls in an appli-
cation is to simplify the form by fitting multiple pages of controls within a single control. In most
cases, there is no point in challenging the user with more than one tab control on a form.Using Dialog Boxes to Collect Information
The dialog box is one of the most valuable user-interface components in Windows applications.
When properly implemented, dialog boxes provide a way to extend the available screen space on
the computer. Instead of having to place every text box, option button, and other user input con-
trol on the main form, dialog boxes provide a handy way to move some of these controls to a con-
venient pop-up device that is on the screen only when needed.Dialog boxes usually collect a certain type of information, such as font attributes or hard-copy param-
eters. Dialog boxes are a valuable way to prefilter or qualify user input without cluttering the main
form. Or use a dialog box to allow the user to enter query criteria before running a query that popu-
lates a form or report, or to gather information that is added to a report’s header or footer area.Although they are forms, dialog boxes should not look like or behave as other forms in the applica-
tion do. Dialog boxes often pop up over the user’s work. When properly implemented, dialog
boxes also provide a means to simply cancel the query without breaking anything on the user’s
workspace.A typical query form implemented as a dialog box is shown in Figure 19.16. This simple form
gathers information that is used to query the database for order information.FIGURE 19.16A dialog box used to collect data for an ad hoc query