Results 1 to 3 of 3
  1. #1
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97

    condition background color of report body

    I am trying to change background color of body when a control in it matches a certain value.
    What I obtain with the following statement ....


    Private Sub Report_Load()
    Select Case [Stato]
    Case "C2"
    Me.Body.BackColor = vbYellow
    Case Else
    Me.Body.BackColor = vbWhite
    End Select


    End Sub

    ...is instead alternate colors of records ?!!?? What's wrong ??

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Found this slightly different approach

    http://www.databasejournal.com/featu...ort-Tricks.htm

    Alan

  3. #3
    focosi is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    97
    thanks, but unfortunately the webpage only deals with alternating row colors. Instead I want to change row color based on control value... Any hint ?

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

Similar Threads

  1. Background Color
    By Meccer in forum Access
    Replies: 4
    Last Post: 05-30-2011, 06:49 AM
  2. Background color for fields in a subform
    By eric.opperman1@gmail.com in forum Forms
    Replies: 3
    Last Post: 03-19-2011, 07:46 PM
  3. Change Row Background Color Programmatically
    By sales@4bco.com in forum Programming
    Replies: 2
    Last Post: 10-25-2009, 11:17 AM
  4. Change as per condition font color
    By miziri in forum Programming
    Replies: 1
    Last Post: 08-20-2009, 04:23 AM
  5. background color in a form
    By taggart in forum Forms
    Replies: 1
    Last Post: 05-07-2009, 10:37 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