Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting the baggrund colour in some rows in a table 1

Status
Not open for further replies.

Larshg

Programmer
Mar 1, 2001
187
DK
I have a subform that consist of a table, in this table there are different rows.

What I would like to do is make different rows appear red if a certain attribute is set.
 
Hi Larshg,
If you have 2000, Yes. Conditional Formatting on the menu bar. 97? Sorry but I have never seen it done except without the aid of "third party" software, and I don't even know where that software came from. (Probably cheaper to buy the 2000 upgrade.) Wish I had a more upbeat answer for you but this was one of the big "pluses" with 2000 and one of the main reasons I bought it. It is a wonderful and useful feature. Gord
ghubbell@total.net
 
I have 2000 - can you telle me a bit about how its done.

In the Query that my table consist of, I have a status attribute which when it is "rejectedPA", should turn the background of the specific row red. The other rows in the table should remain white.
 
In the actual query you do not have this option, however on a form/report in regular, dataheet or continuous view you do.

Place a form in design view and click on a field you would like to format. Lets start with your field that might contain the value "rejectedPA".
On the menu bar choose Format-Conditional Formating.
You'll see Condition 1: select "Expression is", then type in something like this:
[TheFieldName] = "rejectedPA"
and choose the color or format you would like to have if this condition is true. It's really as easy as that. You have to do the same to each of the fields in the same row but here's a secret: If all the fields start out with the same format (same back color, font etc.) you can select them all at once, and do this in one shot.
You have available to you 3 condition choices plus the original setting. You also have "prebuilt" greater than~less than type comparisons. All this is probably one of the most visually useful things MS has ever done. In my applications I use this frequently for dates, for quantities, for names and so forth. Give it a try and if you have any difficulty, please write back. I'll be glad to help you. Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top