dcsimg
Results 1 to 3 of 3

Thread: Custom colors on report

  1. #1
    Join Date
    Jun 2010
    Posts
    3

    Custom colors on report

    I am working on a report in Access 2003 using conditional formatting to set text box colors. Is there a way to use a custom color, or am I stuck with just the options from the "fill color" list?

  2. #2
    Join Date
    Jun 2010
    Posts
    2

    Custom colors on report (Access 2003)

    Unfortunately there is not when using the conditional formatting feature. I've even gone as far as setting 2 conditions that would result in the same answer but changing the color in each, in hopes of the 2 colors mixing together, but it will only take the 1st selection.

  3. #3
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    There is a way of using a custom color in a report to set the text box colors. As you know in a report you are limited to the Fill colors of a textbox.

    On a new form add text box then go to the Back Color property of the text box and select your Custom color now record this value. Close the form without saving.

    On your report Click on the detail section bar and view property details, select ON FORMAT in the events section then enter your condition. Here is an example rpt_test is a text box that will for each record change the back color of the text box if the condtion is met otherwise reset it to the original back color

    NOTE in 2007 the value of the color is a HEX value and must be converted to DECIMAL i.e. base 10.

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    if condition 1 is true then
    Me!rpt_test.BackColor = 10092441
    else
    Me!rpt_test.BackColor = 0
    end if
    End Sub
    Allan

Posting Permissions

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