Problem with conrtol Color

  • Thread starter Thread starter Gary Hull
  • Start date Start date
G

Gary Hull

Hi all

I have a Bound Control on a form

on the same Form I have Command Button

When I click on the button it runs a sub

the sub is designed where if the number in another field on the same
form is <50 then Black and if the Num is >50 then red

this works fine exceipt when I close the form and reopen it the Field
defaults back to black

The field where the red or black data goes is bound to a table

Thanks for your help
 
You don't mention your version of Access. You could also include your code
in the form's Current event. However, if you have Access 2000 or newer, you
could use Conditional Formatting. Open the form in design mode, right click
the control, and choose Conditional Formatting.

Choose Expression Is from the drop down then type in
[FieldName]<50
and choose the font color. Click the Add>> button to add another condition
and do the same thing for >50. You can also use the name of another control
on the form instead of the field name.

In your example, you don't mention anything aboue =50.
 
Back
Top