Modal Property

Applies to

Form Object

Report Object

You can use the Modal property to specify whether a form or report opens as a modal window. When a form or report opens as a modal window, you must close the window before you can move the focus to another object. Read/write Boolean.


expression Required. An expression that returns one of the objects in the Applies To list.


The Modal property uses the following settings.


Visual Basic




The form or report opens as a modal window.



(Default) The form opens as a non-modal window.

You can set this property by using the form or report's property sheet, a macro, or Visual Basic for Applications (VBA) code.

When you open a modal window, other windows in Microsoft Office Access 2007 are disabled until you close the form (although you can switch to windows in other applications). To disable menus and toolbars in addition to other windows, set both the Modal and PopUp properties to Yes.

You can use the BorderStyle property to specify the kind of border a form will have. Typically, modal forms have the BorderStyle property set to Dialog.


You can use the Modal, PopUp, and BorderStyle properties to create a custom dialog box. You can set Modal to Yes, PopUp to Yes, and BorderStyle to Dialog for custom dialog boxes.

Setting the Modal property to Yes makes the form modal only when you:

  • Open it in Form view from the Navigation pane.

  • Open it in Form view by using a macro or VBA code.

  • Switch from Design view to Form view.

When the form is modal, you can't switch to Datasheet view from Form view, although you can switch to Design view and then to Datasheet view.

The form isn't modal in Design view or Datasheet view and also isn't modal if you switch from Datasheet view to Form view.

Note: You can use the Dialog setting of the Window Mode action argument of the OpenForm action to open a form with its Modal and PopUp properties set to Yes.


To return the value of the Modal property for the "Order Entry" form, you can use the following:

Dim b As Booleanb = Forms("Order Entry").Modal

To set the value of the Modal property, you can use the following:

Forms("Order Entry").Modal = True

Need more help?

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.