By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Color Change in report

P: 6
Hey guys, i have a report with categories that are all a different color, could be Red, Yellow, or purple, im creating a report with the invinsible column where the color will be, the point would be if the field is Red, i want to have a Box which is around the category turn red, Ive looked all over and cant find anything.... Any ideas?? btw its in access 2002
Aug 5 '08 #1
Share this Question
Share on Google+
1 Reply


100+
P: 167
You should use 'BackColor' property of the control for this.
First you must set 'Back style' property to 'Normal'
Then in report's 'On Open' property put a code like this
Expand|Select|Wrap|Line Numbers
  1. Me!YourFieldName.BackColor = 255
This will turn that control's back color to RED making that entire column red.
Numbers of colors you can see if you go to that control in design view and click '...' in the 'Back color' property

You can use the Rectangle control that you put behind the field control with the same principle, but above described way is visualy looking better to me.
And you can combine this code with If...Then statements to get different colors etc.
regards, H.
Aug 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.