Conditional Formatting on Continuous Form

G

Guest

I have a continous form and need to display a text box with red text
according to the results of another text box. I have done this using
conditional formatting but it only works when on the current record. I want
the text to be displayed when the form opens if any of the records meet the
criteria.

Can this be done?

Any help is appreciated.

Thanks

Regards

Sonya
 
M

Marshall Barton

SL said:
I have a continous form and need to display a text box with red text
according to the results of another text box. I have done this using
conditional formatting but it only works when on the current record. I want
the text to be displayed when the form opens if any of the records meet the
criteria.


CF does work on all rows on a continuous form. You must
have done something extra to prevent it from doing so.
Please provide more details about the fields in the form's
record source table/query, the text boxes that are involved
and what you specified in CF.
 
G

Guest

I wasn't specific enough before - it works if I have the conditional
formatted text box in the detail section but can I have this text box
displayed red in the header if any of the records in the form meet the
criteria?

To clarify, in the header section I have a text box with conditional
formatting,

Expression Is [LowCapacity]>[DepotTotal]

If this criteria is met by any of the records in the detail section I need
the text to be displayed in red but it is only displaying the text when the
current record is selected.

Thanks
 
M

Marshall Barton

SL said:
I wasn't specific enough before - it works if I have the conditional
formatted text box in the detail section but can I have this text box
displayed red in the header if any of the records in the form meet the
criteria?

To clarify, in the header section I have a text box with conditional
formatting,

Expression Is [LowCapacity]>[DepotTotal]

If this criteria is met by any of the records in the detail section I need
the text to be displayed in red but it is only displaying the text when the
current record is selected.


When you say "any of the records", you are talking about an
aggregation of data across multiple records. This means
that you have to calculate the condition you want CF to
test. The easiest way to do that is to use an invisible
text box named txtTest in the header section. Set its
expression to:
=Sum(IIf(LowCapacity > DepotTotal, 1, 0)

Then use the CF condition expression [txtTest] > 0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top