Conditional formating of control on continuous form

reglarh

Registered User.
Local time
Yesterday, 17:53
Joined
Feb 10, 2014
Messages
118
I have a continuous form on which where each record has many controls, including control (A). I wish to set the colour of this control based on the contents of another control (B). Control B is a memo format and is placed behind another control making it hidden. The idea being that the user can then click on control(A) and look at supporting information from Control B on another form. Conditional formatting cannot be used since this only allows conditions based on the control (A), not (B). Event procedures cannot be used since they all depend on making a record the current record, and I want the user to immediately see when further information is available. When I apply VBA code using an 'on load' event it is actioned for all records on the form in a way that if only one record has extra information, all records are flagged in this way.

Any ideas?
 
You have not mentioned which specific condition is supposed to trigger the colour change.
 
Based on the contents of Control B such as a particular word.
 
"based on" can be anything.

If you mean "if the control contains a given word" then the test is

InStr(MyControlname,WordToSearchFor)>0

and this test you insert in the conditional formatting of the control you wish to colour, after selecting Expression.
 
I must be dumb but I cannot see how conditional formatting can help. It seems to require minimum and maximum values and does not seem to allow me to format one field based on the content of another.

Am I missing something?
 
Like this

attachment.php
 

Attachments

  • Capture.JPG
    Capture.JPG
    37.3 KB · Views: 226
Thanks guys.

In the end it was all about testing for blank and null fields!
 

Users who are viewing this thread

Back
Top Bottom