Search code examples
vbams-accesscolorsms-access-2007

Color constants in Access 2007


The MS Access 2007 Form Design view property sheet exposes some color options that I can't seem to find constants for in order to use them in code. Specifically: Text Dark, Text Light, Background Dark Header and Background Light Header.

Do predefined constants for these exist? I don't seem them in the Object Browser or the Help. Failing that, does anyone know their RGB hex values offhand?


Solution

  • They may come from Windows system settings and not correspond to the same RGB value on every computer.

    After finding this

    You can also see in the Back Color property (or, for that matter, any color property) a list of 20 additional options. These include Alternate Row, Background Form, Background Light Header, Background Dark Header, Borders/Gridlines, Text Black, Text Description, Text Light, Text Dark, Highlight, and Access Theme 1, Access Theme 2, and so on, up to Access Theme 10. These are shades of the color scheme you chose in Access Options-shades of blue for the Blue or Silver theme, and shades of gray and black for the Black theme, and with a shade of orange in all themes for Highlight.

    here

    I'm now thinking it's local to Access. It may be something you can't do with a single RGB value.