Set a color property to a system color

Microsoft Office Access 2003

Show All Show All

Set a color property to a system color

In a database created using Microsoft Office Access 2003, most views, controls, and dialog boxes automatically inherit the Windows theme, if you are using Microsoft Windows XP SP 1, and the chosen theme is not Windows Classic. Exceptions are data access pages, reports, diagrams, SQL view of a query, and modules.

In addition to inheriting the Windows theme, Access also allows you to set the BackColor, BorderColor, and ForeColor properties in a form or report, or the BackgroundColor, BorderColor, and Color properties in a data access page to a system color. Setting color properties to match Windows system colors enables you to specify a single setting that can display different colors on different users' computers, depending on the colors they've chosen in Windows Control Panel.

  1. Open a form, report, or data access page in Design view.
  2. Open the property sheet for the section or control.
  3. In the property sheet, do one of the following:
    • In a form or report, click the BackColor, BorderColor, or ForeColor property.
    • In a data access page, click the BackgroundColor, BorderColor, or Color property.
  4. In the property box, type one of the numbers that are listed in the following table. For example, if you want the background of your form to display the same color that you or another user uses for the Windows background color, set the BackColor property to -2147483643, the value for Window.
    Screen element Form or report Data access page
    Scroll bar -2147483648 scrollbar
    Desktop -2147483647 background
    Active window title bar -2147483646 activecaption
    Inactive window title bar -2147483645 inactivecaption
    Menu bar -2147483644 menu
    Window -2147483643 window
    Window frame -2147483642 windowframe
    Menu text -2147483641 menutext
    Window text -2147483640 windowtext
    Title bar text -2147483639 captiontext
    Active window border -2147483638 activeborder
    Inactive window border -2147483637 inactiveborder
    Application background -2147483636 appworkspace
    Highlight -2147483635 highlight
    Highlight text -2147483634 highlighttext
    3-D face -2147483633 buttonface
    3-D shadow -2147483632 buttonshadow
    Dimmed (disabled) text -2147483631 graytext
    Button text -2147483630 buttontext
    Inactive window title bar text -2147483629 inactivecaptiontext
    3-D highlight -2147483628 buttonhighlight
    3-D dark shadow -2147483627 threeddarkshadow
    3-D light -2147483626 threedlightshadow
    ToolTip text -2147483625 infotext
    ToolTip background -2147483624 infobackground

Notes

  • The Windows system color value refers only to the color of the screen element listed, not to the type of object it can be assigned to. For example, you could set the BackColor property for a text box to the Windows system color for scroll bars, the desktop, or any other screen element.
  • The values for the Windows screen elements are always the same, regardless of the user's color settings.