Share via

Conditional formatting background always black

Anonymous
2010-06-28T10:32:35+00:00

Hi,

Thanks to anyone who can help.

I have just started using Access 2010 for projects originally developed in Access 2007. All the fields that have conditional formatting now display with black background. If I change the rule, or even delete the rule and set it up again, regardless of which colour I ask for the background, the background is always black.

This is occurring on several fields in several different projects with different types of conditional formatting rule. Looks like a bug to me but if anyone knows better...

Tricky

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

19 answers

Sort by: Most helpful
  1. Anonymous
    2010-06-28T19:28:23+00:00

    Hello Marshall,

    Setting a breakpoint is how I determined that the value was -2147483633 in both 2007 and 2010.

    This -ve value is 'System Button Face'.

    Tricky

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-06-28T19:22:49+00:00

    Random thought: Use a breakpoint on that line to verify that the customcolor variable's value is the expected color code.

    Note that a negative color code is replaced by the color in the System Colors (See Help) list, which can be user specified in the Windows Display property sheet.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-06-28T19:11:47+00:00

    Hello Tom and anyone else reading this thread,

    In design mode Access 2007 limits the available colours for conditional formatting, so the only way that I could set the correct backcolor was in vb (in the form's open event procedure), e.g.

        With <textbox control>

            .FormatConditions(0).BackColor = customcolor

        End With

    For some reason this bit of vb is the cause of the black background (but only when the conditional expression evaluates to true).

    In Access 2010 you now have complete control over backcolor in design mode, this allows me to eliminate the vb and the problem goes away.

    However this is some sort of bug or design change in 2010 because in both 2007 and 2010 .FormatConditions(0).BackColor is set to the same value (-2147483633).

    I doubt that anyone else will ever meet this issue but you never know...

    Tricky

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-06-28T14:58:09+00:00

    Hello Tom,

    Thanks for the reply.

    I've been doing a lot of testing to try and narrow this down a bit but don't have any real answers as yet. But I can state the following...

    I have been unable to replicate in a simplified design with a brand new form, i.e created and designed wholly in an Access 2010 environment.

    One of the offending forms (which is really only usable as a continuous forms subform) does not show black background if loaded outside its parent form, but does show black background if loaded inside its parent! However I suspect that this is a 'red herring' because the problem occurs in other forms that are neither continuous forms or subforms.

    When I open the offending forms in design view the conditional formatting 'preview' looks like it is going to be OK, but...

    ...when the form is opened in layout view and the control's conditional formatting queried, the 'preview' shows a black background. If you change to the required background the conditional formatting will be OK until you close and then re-open the form, whereupon the control reverts to black background.

    This is definitely not a video driver problem, the projects' conditional formatting works OK in Access 2007 on the same Windows version (7 64bit) and hardware.

    Was this answer helpful?

    0 comments No comments
  5. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2010-06-28T14:20:20+00:00

    Works fine for me. You may want to check if you can find an updated video driver.

    Does the same problem occur on another computer?

    Does it occur with a sample database downloaded from the Template Gallery?


    -Tom. Microsoft Access MVP

    Was this answer helpful?

    0 comments No comments