Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Posts
    10

    Background color for fields in a subform


    I have a subform that contains a list of outstanding tasks. The subform is based on a query. Each record in the subform has an "Age" field.

    I would like to change the background color of the Age field in each row based on the content of the cell i.e. if the value in Age for the first row < 5 then background color = green. If the value is between 5 and 10, then background color = orange, etc.

    Any help will be appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The simplest solution is to use Conditional Formatting. That assumes you have no more than 3 conditions in addition to the default.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jan 2011
    Posts
    10

    Thx

    Thx! It looks good. I use it all the time in excel, I didn't even think of using it in access

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How to link subform using two fields
    By rohnds in forum Forms
    Replies: 1
    Last Post: 08-04-2010, 04:44 AM
  2. Change Row Background Color Programmatically
    By sales@4bco.com in forum Programming
    Replies: 2
    Last Post: 10-25-2009, 11:17 AM
  3. Color/font change in subform
    By AndyKim in forum Forms
    Replies: 9
    Last Post: 06-24-2009, 04:34 PM
  4. background color in a form
    By taggart in forum Forms
    Replies: 1
    Last Post: 05-07-2009, 10:37 AM
  5. Accessing subform fields
    By nkenney in forum Forms
    Replies: 1
    Last Post: 04-21-2009, 10:10 PM

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