Conditional Formatting Dispaly On Load?

twitchie

Registered User.
Local time
Today, 15:29
Joined
Jan 16, 2003
Messages
41
I'm using Access 2010. I set up conditional formatting in some areas of my report. They're very simple like if a cell is between 0 and .4, then the background color of the field is red. They work just fine...when I click on the field. I don't remember ever running into this issue in the past. I've been reading potential solutions on the web, but haven't found a way to make the conditional formatting rules kick in when the report is loaded. Any ideas? Many thanks!
 
Need more information about the field, is it calculated? If so, is it calculated in the source Query or on the Report? Is it a SUMMMARY field? The timing of the condition to become true may be a factor. I have a complex ORG CHART that uses conditional formatting but all the calculations for the DETAIL are done in the source query.

Hope that may point the way, if not let us know.

Cheers!
Goh
 
Greetings. The fields are in the detail section of the report. Each field is calculated in the field's Control Source. For instance, for one field, the formula is =Abs(Nz([Task_1_1_Flag],0)+Nz([Task_1_2_Flag],0))/2. I display it as a percentage. I then have conditional formatting (using the Conditional Formatting button on the ribbon) that has 4 ranges. If the calculation falls within a particular range, the cell turns a certain color. When i click the cell in the report (giving it focus) the formatting is applied perfectly. I'd just like all of the calculated cells to display this conditional formatting on load of the report and not just when a particular field has focus.
 
I've tried adding this expression to the On Enter, On Focus, and On Click fields. The control calculates just fine, but it just doesn't apply the formatting I'd like:

Code:
=IIf([Task1Percentage] Between 0.9 And 1,[Task1Percentage].[BackColor]=65280,[Task1Percentage].[BackColor]=3937500)
 
Just a stupid question, are you looking at the report in Print Preview mode? I've found that Format will not necessarily trigger in Report view.
 
Just a stupid question, are you looking at the report in Print Preview mode? I've found that Format will not necessarily trigger in Report view.

Yeah that was one issue. The other issue was I was using the Conditional Formatting button instead of just using VBA. I got rif of the ribbon button's formatting and used VBA some helpful folks assisted me with.
 

Users who are viewing this thread

Back
Top Bottom