Conditional format multiple controls

B

bamf

Hi, I have a form which is used to update records in the ClientTable. I want
to set the back colour to be red when the field is blank to alert the user
that data is needed.

I know I can do this for each control (textboxes and combo boxes)
individually but as I have a large number and the cnditions would be the
same, is there a way to code all controls in one go?

Any help woudl be appreciated.
 
F

fredg

Hi, I have a form which is used to update records in the ClientTable. I want
to set the back colour to be red when the field is blank to alert the user
that data is needed.

I know I can do this for each control (textboxes and combo boxes)
individually but as I have a large number and the cnditions would be the
same, is there a way to code all controls in one go?

Any help woudl be appreciated.

If the condition is the same for all of those controls, select each
one while holding the Shift key down.
Then click on Format + Conditional Formatting. Any condition entered
will apply to all of the controls selected.
 
B

bamf

That is what I tried first off, however to be able to set the conditional
format as Is Null the control name needs to be inculded.

Any ideas?
 
F

fredg

That is what I tried first off, however to be able to set the conditional
format as Is Null the control name needs to be inculded.

Any ideas?

What IsNull? One particular field?
You're assuming someone here in the newsgroup can see your database
and read your mind.

If you select all the controls wanted and set Condition1 to Expression
Is and then write IsNull([SomeFieldName]) = True
Does that work?

Sometimes a bit more time spent on your end by giving more details
ends up in all of us spending less time.
 
Top