Choose item for combo box

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
I

Ivor Williams

I have a continuous form in which I compare values in two fields. If the
value in field two is greater than the value in field one, I want to change
the forecolor in field two to red. So far, everything I've tried has
resulted in all or none of the records changing color. Is there a way in a
continuous form to accomplish this at a record level rather than at a form
level?
 
Any modification to the properties of a control will be apparent on all rows
of a continuous subform since there is just one control - just multiple
copies of the control are displayed. To change formatting on a row-by-row
basis you need to use conditional formatting (Access 2000-2003). This
feature allows you to specify upto 3 conditions and formatting options for
when the each of the conditions is met.

To use, select the control, click Format, Conditional Formatting. Check the
help for more details.

CF is somewhat limited in what it can do but it is useful for many
situations. Stephen Lebans has put together a sample database demonstrating
some ways to use Conditional Formatting:
http://www.lebans.com/conditionalformatting.htm

For a more robust solution Stephen Lebans also has code that provides more
conditional formatting features for forms - this also works in Access97:
http://www.lebans.com/formatbycriteria.htm
 
Ivor,

If you are using Access 2000 or later, use Conditional Formatting
applied to the Field Two textbox, for this. Available via the Format
menu in design view of the form.

- Steve Schapel, Microsoft Access MVP
 
Back
Top