Solved Forms: Conditional formatting for multiple fields

Sarah.M

Member
Local time
Today, 09:32
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason (Cybersecurity).
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
----------------------------------------------
I select multiple fields, I want to say in the Conditional formatting expression If any of those selected filled is Null mark the background to green
I do not want to do this IsNull(Contorl1) IsNull(Contorl2) IsNull(Contorl3) becuse I have many controls 😒

Sample attached
plz help 🙏
1654807700844.png
 

Attachments

Make 1 hidden text box "txtCon"
control source:
=[txtBox1asShortText]+[txtbox2AsNumber]+[txtBox3AsDateTime]

Conditional formatting:
expression is
isnull([txtCon])

When you use a plus sign in concatenation then (null + a value = Null). So if any are null the value is null.
 
Make 1 hidden text box "txtCon"
control source:
=[txtBox1asShortText]+[txtbox2AsNumber]+[txtBox3AsDateTime]

Conditional formatting:
expression is
isnull([txtCon])

When you use a plus sign in concatenation then (null + a value = Null). So if any are null the value is null.
Thanks!

All fields are shaded even non-null fields, is there a way to make it shade only empty fields?

Sample attached
 

Attachments

Sorry I misunderstood. I thought you wanted the whole record hilited if one of the fields was null. Unfortunately I think you are stuck with writing a condition for each control. If you had use of VBA you code code the conditions, but since you do not you are stuck. How many controls do you have to format? it cannot take that long.
 
Sorry I misunderstood. I thought you wanted the whole record hilited if one of the fields was null. Unfortunately I think you are stuck with writing a condition for each control. If you had use of VBA you code code the conditions, but since you do not you are stuck. How many controls do you have to format? it cannot take that long
I have ten fields. I am looking for the fastest way to make conditional formatting for multi fields.
I don't want to do them one by one
I want to learn easy tricks helps me to make work faster
 
Code:
I want to learn easy tricks helps me to make work faster
Again unfortunate. There are no easy tricks when you have both hands tied behind your back, since you cannot use vba. This would be trivial with VBA, but you are stuck doing it the long route. However, 10 controls could be done far faster than amount of time to write this thread.
 

Users who are viewing this thread

Back
Top Bottom