Change Backcolor of a text field in a continuos form or change the command button

Posted on 2011-05-02
Last Modified: 2012-05-11
I have a continues form and I need to change the color of the fields if the ONHD QTY > ORDER QTY.
How can i format the color depending on the criteria in Access 2003
Question by:tvae
    LVL 12

    Expert Comment

    Hi there,

    Check below example out on how to achieve this;

    LVL 47

    Accepted Solution

    Use conditional formatting.  You can do one or both of the fields.

    Open the form in design mode, select the control you want to format (or both).

    The click the Conditonal Formatting button on the menu (don't recall precisely where this is in 2003).

    Set the Condiwion1 dropdown to "Expression Is"

    Then in the textbox to the right type:  [onhd qty] > [order qty]

    did you really mean > or did you mean <

    Then selec the desired background color and click OK.

    Author Comment


    Would that be the text box name onhnd or order qty or the field name in my query?

    Author Comment


    disregard previous comment. I figured it out. Will this work the same as the command button or just fields?
    LVL 47

    Expert Comment

    by:Dale Fye (Access MVP)
    This only works for changing the background of bound controls, so it will not work for labels of command buttons.
    LVL 56

    Expert Comment

    by:Jim Dettman (Microsoft MVP/ EE MVE)

     Here's a sample DB which doesn't use conditional formatting, so your not limited to the types of controls you can use this width.


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now