Font Color Change on Click

  • Thread starter Thread starter el zorro
  • Start date Start date
E

el zorro

I have a form with a option group box, with the
options "Denied" and "Approved." If the user
selects "Denied," I want to be sure she sees it so I have
put code in the "On CLick" event to change the font color
to red:

If Frame555.Value = -1 Then
Label559.ForeColor = 255
Else: Label559.ForeColor = 0
End If

This works while the form is open, but when the record is
revisited, the font color returns to black. I could do
an "On Open" code for the form, to look for the Option
group selection and make the label red if the option is
checked-- but that seem too clunky-- too much programming
for a simple task. Is there another way to maintain the
selected color (for the individual record only) when the
from is reopened?

BTW-- you guys are great! Thanks!
 
Use the OnCurrent property to run your code. Also, you should use the
AfterUpdate property of the frame to run the same code.
 
Back
Top