PopUp Property [Access 2003 VBA Language Reference]

Specifies whether a form or report opens as a pop-up window. Read/write Boolean.

expression.PopUp

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

Remarks

The PopUp property uses the following settings.

Setting Visual Basic Description
Yes True The form opens as a pop-up window. It remains on top of all other Microsoft Access windows.
No False (Default) The form or report isn't a pop-up window.

You can set this property by using theproperty sheet , a macro , or Visual Basic .

The PopUp property can be set only in form Design view.

To specify the type of border you want on a pop-up window, use the BorderStyle property. You typically set the BorderStyle property to Thin for pop-up windows.

Tip

ModalPopUpBorderStyle

Setting the PopUp property to Yes makes the form or report a pop-up window only when you do one of the following:

  • Open it in Form view from the Database window.
  • Open it in Form view by using a macro or Visual Basic.
  • Switch from Design view to Form view.

When the PopUp property is set to Yes, you can't switch to other views from Form view because the form's toolbar isn't available. (You can't switch a pop-up form from Form view to Datasheet view, even in a macro or Visual Basic.) You must close the form and reopen it in Design or Datasheet view.

The form isn't a pop-up form in Design or Datasheet view, and also isn't if you switch from Datasheet to Form view.

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

Tip

PopUp

Example

The following example sets the "Switchboard" form to be a modal pop-up form that has just a Close button.

With Forms("Switchboard")
    .PopUp = True
    .Modal = True
    .BorderStyle = 3 ' Dialog style.
End With

Applies to | Form Object | Report Object

See Also | BorderStyle Property | CloseButton Property | ControlBox Property | MinMaxButtons Property | Modal Property