Results 1 to 9 of 9
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Unanswered: Default color for button

    Here is a weird question

    What is the default color number for the command button in access 97?

    I cannot find it anywhere and there is no color match from the color selection grid

    I am trying to match a an unbound text box to overlay on a button. It looks great until I set focus to the control and the back turns white. I want the backcolor to match the button.
    Dale Houston, TX

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I'm not sure what the exact color number is but what I'll do is copy the detail background color of a new form (which defaults to the grey I think you want). -2147483633 I think is the color.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    the button is a different color than the form default isn't it?
    Dale Houston, TX

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    You're probably right Dale. It's just the closest grey color I've used to the command button grey backcolor.
    Last edited by pkstormy; 03-11-08 at 18:42.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Can't you set the control color on form load / before render?
    Code:
    Me.myLabel.BackColor = Me.myCommandButton.BackColor
    George
    Home | Blog

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I think you get an error if you try to use .backcolor from a command button.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I thought that seemed a tad too easy...
    What I actually emant was
    Code:
    Me.Label2.BackColor = Me.Command0.ForeColor
    George
    Home | Blog

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    The forecolour is the colour of the font on the button... and the backcolour for a command button comes from the system colours in control panel... I think.

    Why do you want to do this... seems very odd to be entering into a textbox that is sitting directly over a button... the user clicks there... should the command button trigger or should the focus move to the text box?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Thumbs up Colour Question ?

    See here :
    http://www.mephix.com/

    Choose Software in the menubar and download your choise of language

    Install and you'll be able to see all colour hex number your mouse scrolls over.

    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •