?
Solved

Color specific rows of a subform

Posted on 2011-09-21
7
Medium Priority
?
497 Views
Last Modified: 2012-05-12
Hello guys,

In access 2002, I have a formular and a subform associated and I would like to color certain rows of the subform in function of a  special features (and not only a simple criteria, which supposes just choosing conditionnal presentation).

The application: my presentation shows a course list from the same table, I would like to color courses which appear in an another table (called course_selection).

Hoping  I have been clear,
Thanks is advance!
0
Comment
Question by:Noero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 36575131
Check out this method, which uses a control behind other controls (which are transparent) to add color or graphics and you can base on any condition(s) you want.

Jim.
ContinuousFormColors.zip
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 36575158
Try this ...

Mark the records in a query with a field say Key1 (-1 = True or 0 = False) for the records in both tables.  Then use Conditional Formatting on your form to highlight records where Key1 = -1.

ET
0
 
LVL 48

Assisted Solution

by:Dale Fye
Dale Fye earned 500 total points
ID: 36575226
If I have a complex criteria that I need to evaluate, I will generally create a function and then evaluate the function in the conditional formatting expression, something like:

Expression: fnCondFmt([field1], [field2], [field3]) = 1

0
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 75
ID: 36575615
You might be interested in this:

AlternateColorDetailSection.zip is a class to allow for alternate bands of color for Forms in Continuous View.
http://www.lebans.com/alternatecolordetailsection.htm

(free)

mx
0
 

Author Comment

by:Noero
ID: 36581418
Thanks for your help guys. I am currently studying all the options. First, the one from JDettman:
I have openned  the file but i don't see the link between the color of the item OleBound04 whose source is colorbitmap while it must be connected to the value Colokey or dsiplay override.
If I identified where the function which set the color and the request update, but i cant see the link beetween the control background and the color specified in tables.
I am sure I miss something basic in Access.

Otherwise, i am trying the simplest solution proposed by Fyed: It looks good if only i had not a syntax error that may be you could fix:
I made a function Determine_Color(id as integer, year as integer) as Boolean
i write this in expression: Determine_Color([courseid],[year]) = 1 (or -1) and i obtained a syntax error.
courseid and year are the field of the subform.

DatabaseMX, i will test your class tomorrow!
0
 

Author Comment

by:Noero
ID: 36586461
The trick of fyed works perfectly and is enough for my application (i forgott to put semi colon instead of colons for separating parameters). Thanks for your help guys!
0
 
LVL 58
ID: 36586485
<<The trick of fyed works perfectly and is enough for my application (i forgott to put semi colon instead of colons for separating parameters). Thanks for your help guys! >>

 Did this question get accepted correctly then?

Jim.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question