Conditional formating based on option group (1 Viewer)

Robert C

Registered User.
Local time
Today, 16:30
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
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:30
Joined
Aug 30, 2003
Messages
36,139
You can use "Expression Is" and something like:

[FieldName] = 1

for the condition.
 

Robert C

Registered User.
Local time
Today, 16:30
Joined
Mar 27, 2000
Messages
88
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
 

Robert C

Registered User.
Local time
Today, 16:30
Joined
Mar 27, 2000
Messages
88
Paul

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

Cheers

Rob
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:30
Joined
Aug 30, 2003
Messages
36,139
Sorry, I was at lunch. Glad you got it sorted out.
 

Robert C

Registered User.
Local time
Today, 16:30
Joined
Mar 27, 2000
Messages
88
No Problem. Thanks again

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

Rob
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 08:30
Joined
Aug 30, 2003
Messages
36,139
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

Top Bottom