Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can a checkbox be formatted? (Access 97 SR)

    I have a continuous form on which the CodeAlert checkbox is checked on an individual record when the Code for that record <> "W". The Code is selected from a dropdown. This works fine.

    The user wants the CodeAlert to be red (Border, Fore or BackColor) when it is checked. I do not think Access gives me this ability, but I am hoping I am wrong. Alternately, we can forget the checkbox and have the Code's Forecolor as red if the Code selected <> "W", but when I change the Forecolor on a non-W record, all the codes in the dropdown are red. (not just the non-W's)

    Can this be done or can someone think of another way to present this concept on a continuous form? Thank you.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Can a checkbox be formatted? (Access 97 SR)

    I don't think there is any formatting you can do with a checkbox. If you had Access 2000, you could use the Conditional Formatting capability to easily control the formatting (forecolor, backcolor, etc.) of a text control based on a condition.

    In Access 97, there are ways to vary the colors, but it is not easy. To change the forecolor, you can insert a color in the format property, but this only works for certain situations (it works best if you have a True/False field). So, you could add a textbox to your form, and set its recordsource to: =(Code="W")

    This way, this new textbox's value equates to True if Code="W", and False if Code<>"W". Then set the format property to this:
    <pre> ;"Warning"{red};"OK"{black}</pre>

    Except, change the curly brackets above to square brackets! When I try to use them, they get interpreted as formatting commands here.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can a checkbox be formatted? (Access 97 SR)

    Thank you, Mark. I put a bright red asterisk in the textbox you suggested when the Code = "W" and it looks pretty good. I was stuck on that checkbox and you came up with a really helpful alternative - much appreciation.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Can a checkbox be formatted? (Access 97 SR)

    I'm glad you got what you wanted. One has to be a little creative sometimes to get around Access97 limitations, but it can usually be done one way or another!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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