Link to home
Start Free TrialLog in
Avatar of Noero
Noero

asked on

Color specific rows of a subform

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!
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of Noero
Noero

ASKER

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!
Avatar of Noero

ASKER

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!
<<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.