Conditional formatting for a form

G

Guest

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

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top