Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2011
    Posts
    3

    Unanswered: Checkbox/Un-check Backcolor

    What I am trying to accomplish is when the checkbox is clicked it will change the back color to red of that row the checkbox is on. When I uncheck the box it will turn it back to white.

    I know I have to use the AfterUpdate event but I am no programmer.....

    Thanks in advance.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Actually the simplest solution is Conditional Formatting, presuming you're using a version from 2000 on.
    Paul

  3. #3
    Join Date
    Oct 2011
    Posts
    3
    By going conditional formatting route, I will have to change the color manually instead by a click of the button. Am I understanding this correctly?

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No, you'd set up in CF the color it should be for each value. Then it will change the color itself based on the field value. From the sound of it, you'd either want to apply the format to all the textboxes in the row or a single textbox that sits behind the others, with them being transparent.
    Paul

  5. #5
    Join Date
    Oct 2011
    Posts
    3
    I am looking at doing the whole row. I will have hundreds of records and not all rows will need to be highlighted. Will I have to CF setting apply differently to each?? Thanks

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if this is a form then you immediately have a problem. Conditional formattign only works on single forms, not continuous forms.
    so if you are showing multiple rows per screen then you will not be able to use CF, unless things have changed in more recent versions.

    if you are using reports then cf can be used.
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Healdem: CF works fine on continuous forms from 2000 on. Code based formatting only works on single forms. Perhaps you're thinking of that.

    Kredo: Have you even looked at it? It will do what you're asking. Set it up to change the back color of a textbox if the checkbox is checked (True). It will have that color for any record where the checkbox is true.
    Paul

Posting Permissions

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