borderstyle

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to know the syntax to change a control's border style. I have used me.borderstyle = 2 and also me.borderstyle = "solid" and neither works correctly. Thank you.

seeker52
 
I need to know the syntax to change a control's border style.
I have used me.borderstyle = 2 and also me.borderstyle = "solid" and
neither works correctly. Thank you.

When you use Me.Borderstyle you are referring to the Form's Border
Style, not that of any individual control on the form.
A Form does not have a "Solid" Borderstyle.
For a form, only None, Thin, Sizable, and Dialog are available.

From Access Help...
"You can set the BorderStyle property for a form ** only in form
Design view ** ..."
Styles available are

To learn more, place your cursor on the BorderStyle property line and
press F1.

To change a Control's Borderstyle, using code, use:
If Me![ControlName] = "SomeText" Then
Me![ControlName].BorderStyle = 2 ' (dashes)
Else
Me![ControlName].BorderStyle = 1 ' (Solid)
End If
This can be done while the form is running.
 
Back
Top