Common Application Design Solutions

The remainder of this session explores form techniques commonly used in creating the user interface for an application. Each technique combines macros or code with features of forms. Most of these techniques use features available in Microsoft Access 2.0.

The following techniques are discussed:

Creating a Dialog Box. By setting form properties such as the Modal and ScrollBars properties, adding unbound controls for data entry, and creating buttons with event procedures, you can create dialog boxes for your application's user interface.

Finding a Record Based on a Combo Box Selection. By responding to the AfterUpdate event of a combo box, you can let the user choose records from a list. You'll also want to update the combo box when the user navigates to another record in other ways.

Adding a New Record When It's Not in the List. If your user wants to add a new record rather than selecting an existing one in a list, you need to allow the user to make the entry, and then add the new entry to the list. In Microsoft Access 2.0, you can perform these actions in response to the NotInList event.

Setting a Control's Record Source During Runtime. Since Microsoft Access 2.0 lets you set nearly all properties while your application is running, it's possible to change the contents of a form, subform, or list on the fly. For example, you can limit the choices displayed in a combo box based on what the user selects in an option group.

Examples of these techniques can be found in AC208.MDB.