Conditional formatting for a form

C

CarlaInJax

Hi. I've got a form that has a control with conditional formatting. When
the format is met the control's appearance changes, but I'd like to change
the appearance of the entire FORM if the control's condition is met. As it
is now, if a date is entered into a control, then that control's background
turns blue but I'd like the entire form's background to turn blue (or any
other color) if the condition is met. Is this possible?
Thanks.
 
S

Sprinks

The form does not have a BackColor property, but the FormHeader, FormFooter
and Detail sections do. In the AfterUpdate event procedure of your control,
set as required, e.g.:

Dim intBackColor as Integer
Select Case YourControl
Case SomeValue
intBackColor = SomeValueColorSpec
Case SomeOtherValue
intBackColor = SomeOtherValueColorSpec
Case Else
intBackColor = YourDefaultColorSpec
End Select
Me.Detail.BackColor = intBackColor

Hope that helps.
Sprinks
 
Top