473,608 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Row level condition formating based on column value

16 New Member
Hi,
I want the entire row color to change based on a column value in a report.

Foe example: Select Name,Age,Salary from table 1 -cretes 3 rows.

Name Age Salary
A 15 1000
B 25 2000
c 35 3000

First row should be in red if Salary column is less than 1001

Second row should be green if Salary column is less than 2001.

Third row should be orange if salary is less than 30001.
How to do conditional color formatting of the entire row in Msaccess2007. Please help
Dec 25 '11 #1
11 24954
Rabbit
12,516 Recognized Expert Moderator MVP
You can set the background color of the detail section in the on render event.
Dec 25 '11 #2
Mihail
759 Contributor
Also you can take a look to this thread:
http://bytes.com/topic/access/answer...current-record
Dec 25 '11 #3
NeoPa
32,566 Recognized Expert Moderator MVP
As far as I know Conditional Formatting only works on the field that's being checked, so the link Mihail provided is probably required for your need.
Dec 27 '11 #4
Narender Sagar
189 New Member
Dear NeoPa,
In Access 2010, Conditional Formatting can work for entire row based on value in a particular field. I am using this feature.
Dec 27 '11 #5
Mihail
759 Contributor
Hi Narender !
Can you tell me where is this feature in 2010 ?
Maybe it is also in 2007 but I don't know where to looking for.
Thank you !
Dec 27 '11 #6
Narender Sagar
189 New Member
Yes, you can try in 2007 also. Go to design view of your form. Go to Tab Format. Then select fields for which you want to maintain conditional formatting. Now comes the main thing : Click on "Conditiona l Formatting button on the ribbon. and then click new rule, then choose option : "Expression is". and type something like : [Order Type]="1" (where [Order Type] will be your particular field "Salary" value.)and choose desired color.
Then rest you must be knowing. Create more rules. And that's all.
Dec 27 '11 #7
NeoPa
32,566 Recognized Expert Moderator MVP
Narender:
In Access 2010, Conditional Formatting can work for entire row based on value in a particular field.
Good for you Narender, and also for passing 100 posts :-)
Dec 27 '11 #8
Mihail
759 Contributor
Thank you for reply, Narender, but I think that here is something misunderstandin g.

From baba first post I understand that he/she wish to set color for entire detail section in a form based on value in Salary field/bound control.

After Narender's reply I understand that in 2010 is a feature to do that.

Now, after Narender's last post (as reply to my question) I understand that in 2010 is a feature which allow to set a conditional format for one or more controls based on value from another control.

So, I am in fog (again I suspect my English):
First, which is the question for this thread ? To set entire detail section color or to set controls color for entire record ?
Second: Is it a feature, in 2010, to set color for detail section based on a value from one field/control or this feature can be used to set colors for controls.

Can someone synthesize that for me ?
Thank you !

PS
In 2007 I can't find a way to accomplish that tasks (no one).
Dec 27 '11 #9
Narender Sagar
189 New Member
Dear Mihail,
If you re-look the first post, the question is : He/She wants to change the color of entire row in a report, based on value under salary. So as you said, this option is not available in 2007, but this task can certainly be accomplished in Access 2010.
So as far as question for this thread is concerned, I think it is very much clear.
Dear NeoPa: Thanks.! (for appreciation !)
I just realized I made 100 Bytes..! :)
Dec 28 '11 #10

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

Similar topics

3
10086
by: newsgroper | last post by:
I am evaluating the infragistice ultrawingrid. Does anyone know how I can color a row based upon a column value?
0
2643
by: Amber | last post by:
There are times when you will need to highlight or otherwise modify the contents of a particular DataGrid row-column value based upon the value in the column. In this example we will select the CompanyName, ContactName, and ContactTitle columns from the Customers table in the Northwind database. Whenever the value of ContactTitle equals "Owner" we will change the font color to red. We can do this by using an ItemTemplate where we have...
1
2662
by: Friends | last post by:
Hi I need to set security for row level but not based on Database user's login. It should be based on the user table login. For the particular user I need to allow only the particular records to access insert, update delete and select. Let me explain clearly For example think we are using asp/asp.net website
1
6230
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm populating a datagridview from a data table. I would like to set the back ground color of each row based on a column value in that row. If the value of a column for a particular row is set to 1, then the color of the row is red, 2 color of the row is green, 3 color yellow, etc. How would I go about doing this.
4
7235
by: =?Utf-8?B?QmFidU1hbg==?= | last post by:
Hi, I have a GridView and a SqlDataSource controls on a page. The SqlDataSource object uses stored procedures to do the CRUD operations. The DataSource has three columns one of which - "Modified" of type DateTime - is hidden since it should not be edited by a user. The system handles the update for this column. So, I have hidden (Visible=false) this column on the grid. In order to access the value in this field, I have created a...
0
2085
by: Joe Meng | last post by:
Greetings, I've seen this question asked and answered here, just not completely yet. I'm wondering how to use a column value as a table name in another query. So far it's looking like you must use dynamic SQL, external to DB2. An example: TableX contains column TabName, which is populated by the names of tables in the database. Each of these named tables contains a field called "VID". I wish to match some value of VID in each of...
1
1999
by: devguru | last post by:
I have an interesting script to write. The idea is to "rollup" rows that only differ by one column and concatenate the column value. For example: xxxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz xxxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz 1xxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz 1xxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz 2xxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz 2xxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
0
1742
by: sk27ahmed | last post by:
Hi Any one can show me how to access datagridview column value on column checked unchecked. I create one column in datagridview of type checkbox,and on button click i write code to select all rows in the datagridview. The code for select all is for (int i = 0; i < dataGridView1.Rows.Count; i++) { dataGridView1.Rows.Cells.Value = true; }
3
1507
by: hauschild | last post by:
Guys, I am looping thru a dataset and need to update rows' columns based on the ColumnName value. I get this far but I'm unsure of how to update that actual columns value with the new value. Code follows: string sDate = (Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern.ToString()); string BritishDate; string USDate; if (sDate != "MM/dd/yyyy")
3
11150
by: sri devi | last post by:
Hi Frnz, Kindly, help me. How to compare a single row with a whole column value in C3 For Ex: ROW COLUMN ---------------------- SRI DEVI BABU SRI I want to know the first row value "SRI" is present in that column or not. If its present no work, if its not present the row value will be my answer......
0
8059
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8000
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8470
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6815
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1328
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.