Home

Microsoft Access Topics: Dialog Boxes

 

Introduction

A dialog box is a rectangular object that is used to host or carry other controls:

A dialog box is primarily characterized by two features: its title bar and its body. The title bar, on top of the dialog box, can have a title and has the system close button .

Although this is the normal appearance of a dialog box, it is not strictly exclusive. Some dialog boxes display the system icon. On the right side of the title bar, a classic dialog box displays only the system Close button made of X. Again, this is not exclusive. It is not unusual for a dialog box to display the minimize and the maximize/restore buttons. To use a dialog box, the user must open it one way or another. Your job is to decide how and when the user will be able to open a dialog box.

Creating a Dialog Box

 

There are various ways you can create a dialog box in Microsoft Office Access 2007:

  • To let the application generate a dialog box for you, on the Ribbon, click Create. In the Forms section, click More Forms -> Modal Dialog
  • To create the dialog box yourself, start a form in Design View. To convert an existing form into a dialog box, set its Border Style property value to Dialog. This reduces the system buttons to the Close button only

There are two types of dialog boxes: modal and modeless.

Modal Dialog Boxes

 

A dialog box is characterized as modal if the user must close it before continuing with another task on the same application.

In order to use a dialog box in your application, you should analyze a scenario and define if the dialog box is necessary. Use a dialog box if you want the user to first terminate whatever task he or she would be performing. For example, if a user is performing a payment of an order processing, it is natural to process and finish that payment before starting another task.

A classic (or normal) dialog box would need neither a Record Selectors bar nor the record navigation buttons. Therefore, you should decide how the dialog box would be used. If you want a regular dialog box as those available on non-database applications, you should set the Record Selectors, the Navigation Buttons and the Dividing Lines properties to No each.

Modeless Dialog Boxes

 

A dialog box is referred to as modeless if the user does not have to close it in order to continue using the application that owns the dialog box. The Find dialog box of most applications is an example of a modeless dialog box. If it is opened, the user does not have to close it in order to use the application or the document in the background. 

Since the modeless dialog box does not display its button on the task bar, the user should know that the dialog box is opened. To make the presence of a modeless dialog box obvious to the user, it typically displays on top of its host application until the user closes it.

To create a modeless dialog box, or to convert a form into a modeless dialog box, in Design View, set the Popup property (Other and All tabs) to Yes. This makes sure that the user can work on another form and the modeless dialog box or form would remain on top of any other form of your database.

 

Home Copyright © 2008-2012 FunctionX