Control Button Colors

T

Tony Uythoven

I have a form with several control buttons, whose foreground color I want to
be determined by flags stored in the database. For example, if the flag
associated with a control is TRUE, the color should be red, if FALSE green.

My program version is MS Access 2000/2002. Is there code for this function?
 
S

Steve Schapel

Tony,

The code could look something like this...

If Me.YourFlagger
Me.YourCommandButton.ForeColor = vbRed
Else
Me.YourCommandButton.ForeColor = vbGreen
End If

You will need to determine which event(s) are applicable to this. Maybe
the On Current event property of the form, and also the After Update
event property of the Flagger?
 
Top