Follow this blog:
RSS
Email Alert

Microsoft Office

How to guarantee color consistency

Takeaway: In Monday’s entry, I showed you how to match a control’s background color to the form’s by using the same color for both. It’s a simple cure for a larger problem — keeping colors consistent from object to object. Even when you find a match, you can’t guarantee that the specified colors will be the [...]

In Monday’s entry, I showed you how to match a control’s background color to the form’s by using the same color for both. It’s a simple cure for a larger problem — keeping colors consistent from object to object. Even when you find a match, you can’t guarantee that the specified colors will be the same, or continue to match, on another system.

If color is important, you should probably stick with the Windows color constants and avoid custom colors. These constants have been around since Access 2000 and they certainly simplify color-related problems. When using Windows color constants, your forms and controls will always match the Windows display settings. In addition, Access will automatically update the colors if the user changes the Windows display settings.

For a complete list of the Windows color constants, view SystemColorConstants in the Object Browser.

november2007blog2fig1r.jpg

Or view the list online. If you need the Long value for a constant, open the Immediate window and type ? plus the constant. For instance, ?vbScrollBars will return -2147483648.

november2007blog2fig2r.jpg

Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.

Susan Harkins

About Susan Harkins

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

Susan Harkins

Susan Harkins
Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.