Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 804995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:00:34+00:00 2026-05-15T00:00:34+00:00

I have a datasheet that looks like this: ID name_ 1 2 3 4

  • 0

I have a datasheet that looks like this:

ID  name_   1   2   3   4
1   name1   x   0   0   0
2   name2   0   x   0   0
3   name3   0   0   x   0
4   name4   0   0   0   x

I have rectangles on a report that correspond to this datasheet.

When the report opens, I need the rectangles to be colored red according to the data. For example, in the name1 row where there is an x in the 1 column, I need the specific rectangle corresponding to this (name1, 1) to be colored red. Here is the result that I need:

x           
    x       
        x   
            x

(where x is a rectangle that is red)

Perhaps the best place to place this code would be in ON LOAD event of the report, but i am not sure exactly. Can you please suggest to me some code that would turn the specified rectangles red according to the data?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:00:34+00:00Added an answer on May 15, 2026 at 12:00 am

    In this case, I see no reason that @Remou’s answer is not correct — you want to display an x, which is data, so you would use a textbox with conditional formatting that sets the background color appropriately.

    However, if you wanted to do this without a data control, you’d likely use the Format event of the Detail of the report. This is the event that fires when each record is processed, and it could be used to run a test that determines which rectangle to hide/show or what color to give the background of the rectangle.

    The OnOpen runs before any of the data is loaded, and the OnLoad event before any particular rows are accessed. Because of that, neither is appropriate for formatting controls in individual rows of the report.

    And BTW, your mention of the OnLoad in reports indicates that you’re using Access 2007 or later (the event didn’t exist for reports in A2003 and earlier), and you should have stated that in your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sub form that looks like a datasheet view. It returns prices
i have a dataset that looks like this: Bin Frequency 6.0 0 5.9 0
I have a dataset that looks like this: a <- data.frame(rep(1,5),1:5,1:5) b <- data.frame(rep(2,5),1:5,1:5)
I have a L2S query that looks like this: using (MyDC TheDC = new
I have a dataset that looks like this: 0 _ _ 23.0186E-03 10 _
SQL 2008 Basically i have a dataset that looks like this: AcctID AcctType AcctSubType
I have a SAS dataset that looks like this: var _12 _41 _17 12
i have text file that looks like this: 1 \t a 2 \t b
I have a dataset that looks like this: 1 -0.151714363660730E+03 0.681572558518519E+02 -0.147787110884357E+03 0.702453634941157E+02 -0.147765104000000E+03
I have a dataset in Reporting Services that looks something like this: ID |

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.