Results 1 to 4 of 4
  1. #1
    casinc815 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2013
    Location
    Chicago, IL
    Posts
    46

    The Color Palette and Dynamic use in VBA code.

    I have a Form that retrieves a Students reading and language scores from a testing
    facility that the local school district uses to monitor the progress of students.

    The form is a light blue (sky blue!) and can be found on the last row of the color
    pallete in the middle of the pallette. The controls are a light grey and the fields are
    sunken white, the fond is black. I have gotten a lot of compliments on the visual ease of the form
    and now the user wants me to print the form. I did! I use the Printout function


    and the form printed perfectly. Since each student has two result records, each
    record was printed perfectly using the Print all function, on one page. Perfect!!!

    The problem is not the form or the printing but the color. Now I am told the school went
    through two blue cartridges in three days and everyone enjoys printing the colored form.
    The head honcho wants WHITE, not BLUE. So FormHeader.BackColor= vbWhite and Detail.BackColor
    = vbWhite did the trick and reduced the blue color being printed.

    Now what is the color to reverse back to the original color. vbBlue is not the right color.
    QBFunction(9) does not change to a sky blue color. The color on the last line of the color pallette
    is what I am trying to get to be reproduced. Anybody?

    Help! - Jim

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Better to print a report instead of form.

    Try RGB color codes:

    FormHeader.BackColor=RGB(0, 183, 239)

    Also, review http://blogs.office.com/b/microsoft-...m-in-code.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    casinc815 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2013
    Location
    Chicago, IL
    Posts
    46
    Quote Originally Posted by June7 View Post
    Better to print a report instead of form.

    Try RGB color codes:

    FormHeader.BackColor=RGB(0, 183, 239)

    Also, review http://blogs.office.com/b/microsoft-...m-in-code.aspx

    Thanks for the help! I will look into this. - Jim

  4. #4
    casinc815 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2013
    Location
    Chicago, IL
    Posts
    46

    follow-up

    Quote Originally Posted by casinc815 View Post
    Thanks for the help! I will look into this. - Jim
    I did some review of the suggestion that were made to my inquiry.

    As a standard of practice, when I use color it is necessary to get the RGB code so that dynamic
    manipulation of color is easier. The code is retrieved from the color pallete under "More colors"
    and is then documented in the OnOpen procedure for all forms. The same technique is used on all
    field or control within a form.

    Thanks for the help everyone.

    Jim

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dynamic ComboBox Not in List Code Error
    By quicova in forum Programming
    Replies: 7
    Last Post: 09-19-2013, 08:10 AM
  2. Color Code Query Results
    By jo15765 in forum Queries
    Replies: 6
    Last Post: 01-10-2013, 09:13 PM
  3. VBA Code for Mail Merge via Dynamic Data Exchange
    By Ganymede in forum Programming
    Replies: 2
    Last Post: 12-28-2011, 05:20 PM
  4. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  5. Replies: 5
    Last Post: 06-29-2010, 10:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums