Had an interesting little bug in Office today in which a solid 2px black (#000000) border does not appear around a subform control (and this ends up applying to many other controls and shapes as well)
I was really scratching my head, until I went online to find out if anyone else had had this problem and found this post involving some of my favorite fellow Access programmers:
Can’t get a Black 1pt or 2pt border around a rectangle. | Access World Forums
Turns out if you set the color to anything but #000000 is works.
Now why would this be?
I suspect that #000000 is equivalent numerically to 0 in a particular context where the MS Office Developers are checking something against < 3 px borders. 0 Is also equivalent to the Boolean False.
So if they have some statement like:
If Object.Color = False Then UseTransparentBorder
Something like that would cause the bug.
I did discover that using the dropdown on the color property dialog and choosing the “Text Black” option also works. This is likely because this causes the code to take a different path.
I of course don’t have access to the VBA source code, so I can’t know by looking there, but maybe someday it will get fixed.
This simply reminds me that MS Access is not 100% bug free software and that my customers also occasionally find bugs in my code for corner case situations that I didn’t test, so I’m not too hot under the collar about it. Overall, the MS Access Dev team I feel has done a pretty decent job keeping it working as well as it does. It’s quite a piece of software!
So thanks MS Office Dev team. I hope you will eventually find and fix this bug, but I still appreciate you and recognize your contributions that have given me a great way to make a living!