Table of contents
TOC
Collapse the table of content
Expand the table of content

Line.OldBorderStyle Property (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

You can use this property to set or returns the unedited value of the BorderStyle property for a form or control. This property is useful if you need to revert to an unedited or preferred border style. Read/write Byte.

Syntax

expression. OldBorderStyle

expression A variable that represents a Line object.

Remarks

The OldBorderStyle property uses the following settings.

SettingVisual BasicDescription
Transparent0(Default only for label, chart, and subreport) Transparent
Solid1(Default) Solid line
Dashes2Dashed line
Short dashes3Dashed line with short dashes
Dots4Dotted line
Sparse dots5Dotted line with dots spaced far apart
Dash dot6Line with a dash-dot combination
Dash dot dot7Line with a dash-dot-dot combination
Double solid8Double solid lines

Note

Example

The following example demonstrates the effect of changing a control's BorderStyle property, while leaving the OldBorderStyle unaffected. The example concludes with setting the BorderStyle property to its original unedited value.

With Forms("Order Entry").Controls("Zip Code")
    .BorderStyle = 3 ' Short dashed border. 

    MsgBox "BorderStyle = " &; .BorderStyle &; vbCrLf &; _ 
        "OldBorderStyle = " &; .OldBorderStyle  ' Prints 3, 1. 

    .BorderStyle = 2 ' Dashed border. 

    MsgBox "BorderStyle = " &; .BorderStyle &; vbCrLf &; _ 
        "OldBorderStyle = " &; .OldBorderStyle  ' Prints 2, 1 

    .BorderStyle = .OldBorderStyle ' Solid (default) border. 

    MsgBox "BorderStyle = " &; .BorderStyle &; vbCrLf &; _ 
        "OldBorderStyle = " &; .OldBorderStyle  ' Prints 1, 1 
End With

See also

Concepts

Line Object

© 2017 Microsoft