changing back color for many fields

  • Thread starter Thread starter mark r
  • Start date Start date
M

mark r

I have a form with 200 fields
there are maybe 50 fields I consider critical for the user.
so I want those fields to have a red back color if they
are null.
Once they enter data into the field or click on it, the
back color will change to white.

I am using CHANGE() and CLICK() for each individual field.
3 questions:

1. Is there a more efficient way to code this rather than
100 individual private subs?

2. if the user moves to the field using tab, can I use
gotfocus() to change the back color to white.

3. If I the user wants a
commandbutton_change_anyredback_color_to_ white,
how could I code that?

thanks
 
Mark

You didn't mention which version of Access you are using. If recent enough,
consider using the Conditional Formatting capability.
 
Back
Top