Microsoft Access Domain Wizard Interface Design

Larry W Jordan Jr.
John Klabo
Derik Harris
Microsoft Corporation

Created: July 8, 1996
Revised: July 23, 1996

Larry W Jordan Jr is a Senior Microsoft Access support engineer.  His main focus is VBA,  wizard and add-in development and Visual SourceSafe integration.

John Klabo is a Microsoft Access support engineer.

Derik Harris is a Senior Microsoft Access content engineer.  His primary responsibility is writing, editing, and publishing Microsoft Access related material for the Microsoft Knowledge Base and the Microsoft Web site.

Click to open or copy the DOMWIZ project files.

Overview

The Domain Function Wizard was created to help automate the tedious process of coding domain aggregate (totals) functions. The wizard helps the user in building the domain aggregate function syntax by having the user make selections in a step-by-step process. Once the appropriate selections have been made, the user may click the Finish button, at which time the generated syntax will be copied to the system clipboard.

This wizard is implemented in the same way as all standard Microsoft Access for Windows 95 wizards. It makes use of a main form that controls the “Page” navigation. The “Pages” are actually subforms that are displayed by changing the SourceObject property of the subform control on the main form.

Figure 1. Page 1 of the Domain Wizard

On page 1 of the wizard, users choose which function they want to build from a list of all available Microsoft Access Domain Aggregate functions. After choosing a function, they selects either a table or query from the list of domains. This will be the recordset which the function is run against. After choosing a function, they select the field. This denotes what value the function will use in its calculation.

Once selections have been made, clicking the Next > button displays:

Figure 2. Page 2 of the Domain Wizard

Users can set any criteria they want on page 2 of the wizard. Criteria is used to filter the recordset upon which the domain function is run. Users can set up to eight criteria statements.

To keep users from making invalid selections, certain option are not always available. For instance, in the example to the right, the Begins with, Ends with, and Contains option buttons are not available. This is because the field ObjectID is Numeric, and it is not possible to do a string comparison on a Numeric field.

Figure 3. Page 3 of the Domain Wizard

The last page in the wizard contains the generate function syntax.

Summary

The Domain Function Wizard offers a wide variety of useful code snippets and demonstrates a standard way of implementation.