ControlBox Property

Applies To

Form.

Description

You can use the ControlBox property to specify whether a form has a Control menu in Form view.

Setting

The ControlBox property uses the following settings.

Setting Description Visual Basic
Yes (Default) The form has a Control menu in Form view. True (-1)
No The form doesn’t have a Control menu in Form view. False (0)


You can set this property using the form’s property sheet, a macro, or Visual Basic.

You can set this property only in form Design view.

Note Setting the ControlBox property to No removes the Minimize, Maximize, and Close buttons on a form.

Remarks

To display a Control menu on a form, the ControlBox property must be Yes and the form’s BorderStyle property must be set to Thin, Sizable, or Dialog.

Even when a form’s ControlBox property is set to No, the form always has a Control menu when opened in Design view.

Setting the ControlBox property to No suppresses the Control menu when you open the form in Form view from the Database window, using a macro, or Visual Basic. The Control menu is also suppressed when you switch to another view from Form view.

See Also

BorderStyle Property, CloseButton Property, MinMaxButtons Property, Modal Property, PopUp Property.

Example

The following example sets the ControlBox property on the WarningBox form to False.


Forms!WarningBox.ControlBox = False