Specifies whether a form has a Control menu in Form view and Datasheet view. Read/write Boolean.
expression.ControlBox
expression Required. An expression that returns one of the objects in the Applies To list.
The ControlBox property uses the following settings.
Setting | Visual Basic | Description |
---|---|---|
Yes | True (รป1) | (Default) The form has a Control menu in Form view and Datasheet view. |
No | False (0) | The form doesn't have a Control menu in Form view and Datasheet view. |
Note Setting the ControlBox property to No also removes the Minimize, Maximize, and Close buttons on a form.
You can set this property by using the form's property sheet, a macro, or Visual Basic.
It can only be set in form Design view.
To display a Control menu on a form, the ControlBox property must be set to 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: