Create a dialog box

You can create a dialog box by creating a form and setting certain properties to make the form function like a dialog box.

  1. Create a form and add the controls you want on the dialog box to the form.
  2. Open the form in Design view (Design view: A view that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects.).
  3. Double-click the form selector (form selector: The box where the rulers meet, in the upper-left corner of a form in Design view. Use the box to perform form-level operations, such as selecting the form.) to open the property sheet (property sheet: A pane that is used to view or modify the properties of various objects such as tables, queries, fields, forms, reports, data access pages, and controls.).
  4. In the Pop Up property box, click Yes.
  5. In the Modal property box, click Yes.
  6. In the BorderStyle property box, click Dialog.
  7. In the RecordSelectors property box, click No.
  8. In the NavigationButtons property box, click No.
  9. In the DividingLines property box, click No.
  10. Create a macro or an event procedure to open the dialog box.
  11. Attach the macro or an event procedure to the form by specifying the macro name or event procedure as the setting for the appropriate event property. For example, type the name of the macro or event procedure in the OnClick property box of a command button.

To position a dialog box on the screen, open it in Design view, maximize the Microsoft Access window, position the window where you want it, and then save the form. The dialog box will appear in this location when it is opened (assuming the AutoCenter property is set to No and you haven't specified its position in the event procedure that opens the dialog box).

 
 
Applies to:
Access 2003