What is the code for System Menu Highlight for Back Color on a property on a control on a form?

Posted on 2008-11-05
Last Modified: 2013-11-28
I am using Access 2007 and need to use VBA code to change the back color on a label to "System Menu Highlight".

This fails:  Me.lblBondNum.BackColor = "System Menu Highlight" if I use the string. Is there a code/number to use for System Menu Highlight, so I can set the property?
Question by:gtrapp
    LVL 14

    Accepted Solution

    These are the system color values I know.

    -2147483648      Scroll bar color
    -2147483647      Desktop color
    -2147483646      Color of the title bar for the active window
    -2147483645      Color of the title bar for the inactive window
    -2147483644      Menu background color
    -2147483643      Window background color
    -2147483642      Window frame color
    -2147483641      Color of text on menus
    -2147483640      Color of text in windows
    -2147483639      Color of text in caption, size box, and scroll arrow
    -2147483638      Border color of active window
    -2147483637      Border color of inactive window
    -2147483636      Background color of multiple-document interface (MDI) applications
    -2147483635      Background color of items selected in a control
    -2147483634      Text color of items selected in a control
    -2147483633      Color of shading on the face of command buttons
    -2147483632      Color of shading on the edge of command buttons
    -2147483631      Grayed (disabled) text
    -2147483630      Text color on push buttons
    -2147483629      Color of text in an inactive caption
    -2147483628      Highlight color for 3-D display elements
    -2147483627      Darkest shadow color for 3-D display elements
    -2147483626      Second lightest 3-D color after vb3DHighlight
    -2147483625      Color of text in ToolTips
    -2147483624      Background color of ToolTips

    You can also use the object browser (F2) and search the VBA library for SystemColorConstants.

    I don't see anything that looks like  System Menu Highlight, but you can try the value of "Background color of items selected in a control" , -2147483635.



    Author Closing Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now