First Published 29 Oct 2024

An old thread at Access World Forums, Can't get a Black 1pt or 2pt border around a rectangle was recently resurrected and reminded me of this minor display bug.

As the thread title indicates, it is impossible to set a pure black border to 1pt or 2pt in Access.
The following steps will allow you to reproduce the problem:
1.   Create a rectangle on a form or report. Set the border color to Black (#000000) and width = Hairline.
2.   Increase the border width to to 1pt then 2pt. No change occurs – the border is still hairline.

Black Border Bug
3.   Increase the border width again to 3pt or more. The width now responds correctly.

3pt Black Border
4.   Now repeat with any other color border e.g. #000001; border widths of 1pt and 2pt do now display correctly.

2pt Not Black Border
5.   Repeat with other controls with a border e.g. textbox. Exactly the same results – black borders (ONLY) go from hairline to 3 pt with nothing between

Further testing indicates that:
a)   the issue has existed in all versions since Access 2003. Versions prior to that do behave correctly for 1pt/2pt black borders.

b)   Unticking Use Windows-themed Controls on Forms in Access Options 'fixes' the issue. Many thanks to former MVP, Anders Ebro, for noticing that.

      However changing this setting will affect all controls on each of your forms.

Windows Themed Option
NOTE:
This setting has only existed since A2007. It doesn't explain why the problem originated with MDB files in A2003.
So whilst disabling themed controls ‘fixes’ the issue, perhaps those aren’t the actual cause.

I did try altering the special effect property (flat / raised / etched atc) but couldn’t see a direct link.



Status

The Access team have acknowledged the issue which may be related to the use of control themes or to the special effect control property.
Although only a very minor issue, hopefully it will be easy to fix.

In the meantime, the easiest workaround is to set the border color so it isn't pure black. Even Text Black will work correctly.



Feedback

Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.

Please also consider making a donation towards the costs of maintaining this website. Thank you



Colin Riddington           Mendip Data Systems                 Last Updated 29 Oct 2024



Return to Access Blog Page




Return to Top