473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Row level condition formating based on column value

16
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 24934
Rabbit
12,516 Expert Mod 8TB
You can set the background color of the detail section in the on render event.
Dec 25 '11 #2
Mihail
759 512MB
Also you can take a look to this thread:
http://bytes.com/topic/access/answer...current-record
Dec 25 '11 #3
NeoPa
32,556 Expert Mod 16PB
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 100+
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 512MB
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 100+
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 "Conditional 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,556 Expert Mod 16PB
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 512MB
Thank you for reply, Narender, but I think that here is something misunderstanding.

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 100+
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
Mihail
759 512MB
Oh, thank you, Narender.
In my had it was all the time a form.

Thank you, again !
Dec 28 '11 #11
Narender Sagar
189 100+
Mihail, I am sorry, I didn't understand your last post correctly, however, conditional formatting can be set, similar way in forms also (of course in Access 2010) for sure.
Thanks..
Dec 28 '11 #12

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

Similar topics

3
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
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...
1
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...
1
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...
4
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 -...
0
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...
1
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...
0
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...
3
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. ...
3
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 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.