Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011

    Unanswered: row color change based on data selected or entered

    I need the row color to change to purple if the number 202 is selected (in a field) from the form and also if it is entered directly on the datasheet.

    I am a newbie and really need some help.

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    While the last two versions of Access have a native function, I believe, for 'highlighting' alternate rows in a Datatsheet View Form, there is no provision for doing this kind of thing. And there really is no 'row' per se, but using Conditional Formatting you can, for instance, change the Back Color of all Controls, or the Font Color to kind of imitate this effect.

    Assuming you're running Access 2000 or later. We'll call the Control you're speaking of TargetTextbox.

    1. In Design View, select each Control that you want to format. You can do all of them at once by holding down <Shift> and Left Clicking on each of them in turn.
    2. On the menu go to FormatConditional Format
    3. Under Condition1 use the down arrow to select Expression Is
    4. In the next box type in: [TargetTextbox] = 202
    5. Now select the formatting you want when this condition is true.
    6. You're done.

    In Single View and Continuous View the formatting is instantaneous, but in Datasheet View there always seems to be a very slight hesitation when the form first loads. Don't know why this happens.

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jun 2011

    I did something wrong...

    Hi I followed your directions but it did not turn the records purple. I am not sure what I did wrong. I use Access 2010. In the "Form", I followed your instructions and tried this several times.

    BTW Thank you for answering my call for help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts