Control Button Colors

  • Thread starter Thread starter Tony Uythoven
  • Start date Start date
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?
 
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?
 

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

Back
Top