Conditional formating based on option group

Robert C

Registered User.
Local time
Today, 00:24
Joined
Mar 27, 2000
Messages
88
I have a continuous form (frmLiveProjects) – filtered by a query (qryClientProjectsFrm) from the main form (frmProjects). On frmProjects there is an option group (FrameProjectStatus) which has three alternate options.

I would like to change the background colour of the fields for the various records on frmLiveProjects depending on which option is checked on the option group.

If none of the three options are checked then I would like to background colour to remain white.

Any help would be very gratefully received.

Cheers

Rob
 
You can use "Expression Is" and something like:

[FieldName] = 1

for the condition.
 
Thanks Paul

However, I am afraid I need this kind of thing spelt out for me. Where does the "Expression Is" condition go?

Sorry to be so clueless.

Cheers

Rob
 
Paul

It's OK. I figured it out - thanks for pointing me in the right direction.

Cheers

Rob
 
Sorry, I was at lunch. Glad you got it sorted out.
 
No Problem. Thanks again

Just as a matter of interest. What do you do if you have more than three variables?

Rob
 
As you've seen, Conditional Formatting only allows for 3 variables (which gives you 4 formats counting the default). More than that on a report isn't too tough, but gets tricky on a continuous form. In a report you can use the format event of the section containing the control and do the conditional formatting in code. Forms don't have that event, so you can't do it that way. In single form view you can use code, but it doesn't work in continuous forms view. I've seen workarounds, but never needed one of them.
 

Users who are viewing this thread

Back
Top Bottom