Bound Object Frame Control, Chart Control, Check Box Control, Combo Box Control, Form, Image Control, Label Control, Line Control, List Box Control, Option Button Control, Option Group Control, Rectangle Control, Text Box Control, Unbound Object Frame Control.
For forms, the BorderStyle property uses the following settings.
Setting | Description | Visual Basic |
None | The form has no border or related border elements. | 0 |
Thin | The form has a thin border and can include any of the border elements. The form isnt resizable (the Size command on the Control menu isnt available). You often use this setting for pop-up forms. (If you want a form to remain on top of all Microsoft Access windows, you must also set its PopUp property to Yes.) | 1 |
Setting | Description | Visual Basic |
Sizable | (Default) The form has the default border for Microsoft Access forms, can include any of the border elements, and can be resized. You often use this setting for normal Microsoft Access forms. | 2 |
Dialog | The form has a thick border and can include only a title bar and a Control menu. The form cant be maximized, minimized, or resized (the Maximize, Minimize, and Size commands arent available on the Control menu). You often use this setting for custom dialog boxes. (If you want a form to be modal, however, you must also set its Modal property to Yes. If you want it to be a modal pop-up form, which dialog boxes typically are, you must set both its PopUp and Modal properties to Yes.) | 3 |
You can set the BorderStyle property only in form Design view using the forms property sheet, a macro, or Visual Basic.
For controls, the BorderStyle property uses the following settings.
Setting | Description | Visual Basic |
Transparent | (Default only for label, graph, and subreport) Transparent | 0 |
Solid | (Default) Solid line | 1 |
Dashes | Dashed line | 2 |
Short Dashes | Dashed line with short dashes | 3 |
Dots | Dotted line | 4 |
Sparse Dots | Dotted line with dots spaced far apart | 5 |
Dash Dot | Line with a dash-dot combination | 6 |
Dash Dot Dot | Line with a dash-dot-dot combination | 7 |
You can set the BorderStyle property using the controls property sheet, the Formatting toolbar, a macro, or Visual Basic.
You can also set this property using the controls default control style.
A controls border style is visible only when its SpecialEffect property is set to Flat or Shadowed. If the SpecialEffect property is set to something other than Flat or Shadowed, setting the BorderStyle property changes the SpecialEffect property setting to Flat.
For a form, the BorderStyle property establishes the characteristics that visually identify the form as a normal form, a pop-up form, or a custom dialog box. You may also set the Modal and PopUp properties to further define the forms characteristics.
You may also want to set the forms ControlBox, MinMaxButtons, ScrollBars, NavigationButtons, and RecordSelectors properties. These properties interact in the following ways:
If you open the form in Form view and then switch to another view, the BorderStyle property setting will be in effect in the other view.
If you set the BorderStyle property of a pop-up form to None, you wont be able to close the form unless you put a Close button on it that runs a macro containing the Close action or an event procedure that uses the Close method.
Pop-up forms are typically fixed in size, but you can make a pop-up form sizable by setting its PopUp property to Yes and its BorderStyle property to Sizable.
You can also use the Dialog setting of the Window Mode argument of the OpenForm action to open a form with its Modal and PopUp properties set to Yes.
BackStyle Property, BorderColor Property, BorderWidth Property, ControlBox Property, ForeColor Property, MinMaxButtons Property, Modal Property, PopUp Property, SpecialEffect Property.