Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatically Change Background Color (Access 2000)

    The problem is that I have a database with active and inactive items. If an item is inactive, I want it to be obvious that it is so. Currently, the only indication is the checkbox on the form (checked "Yes"). If the background color was to change to (say) red or an image would appear or perhaps a border would change color, it would make it much easier to see that the item is inactive. I particularly want to use this feature on a continuous form.

    I tried using conditional formatting, but was not successful.

    If you have any ideas on how I can do this, I'd appreciate it.

    Thanks,

    JoeK

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Automatically Change Background Color (Access 2000)

    One way to do it is as follows:
    - Place a text box on the form.
    - Set its Control Source to the same field that the check box is bound to.
    - Set conditional formatting for this text box:
    - If none of the conditions is met, set both fill color and font color to something neutral, such as grey or white.
    - If the value is equal to True, set both fill color and font color to (for example) red.
    - Click OK.
    - Set the Border Style of the text bo to Transparent.
    - Set Enabled to No and Locked to Yes.
    - Make the text box cover the entire detail section.
    - Select Format | Send to Back.

    Also, <!profile=SteveH>SteveH<!/profile> has posted a demo in <post#=264010>post 264010</post#> that shows how to change the background color in a continuous form depending on a condition. I posted a database demonstrating various techniques for coloring in continuous forms in <post#=382292>post 382292</post#>.

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Jerusalem, Israel
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically Change Background Color (Access 2000)

    Thanks for your quick reply, Hans.

    I'll give it a go.

    JoeK

Posting Permissions

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