Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background Color on a Subform Control

Status
Not open for further replies.
Sep 21, 2005
17
0
0
US
Given:
A subform with totals.
A control on the subform with the source:
=IIf ([Forms]![Subproject/TransactionHead]![TransactionHead].[Form]!{PlanAmt] = Sum ([PlanAmt]/1000),"In Balance","Out Of Balance"

The words show as appropriate.

Now I want the field to show a background color of green or red depending upon the condition of balance. IOW if the field is In Balance I would like a Geen background usw.

I tried using conditional formatting with I have used many times on similar conditions. I have also tried using program code to set the BackgroundColor depending upon the value of the ifeld -- nothing works.

Where have I gone astray?
 
Did you use Expression Is when trying Conditional Formatting?
 
Hi REMOU

Yes I tried Expression Is "In Balance" --- but nothing happened either bad or good.

Somehow it seems that there is some sort of timing problem here. When I fast forward through the form, from record to record, the field that I am trying to color does not show its result until I stop the fast forward and allow it time to calculate. It calulates fine -- but I can't seem to use either Conditional formatting or code to color the field after if has been calculated. I use this technique on other forms and it seems to work fine but there is something quirky about this form.

Regards,
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top