Create a dialog box

Microsoft Office Access 2003

Show All Show All

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.
  3. Double-click the form selector to open the property sheet.
  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).