Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional formatting expressions (XP sp1)

    I've used conditional formatting a little but have no idea how to achieve the following:

    Colour a text box (any colour will do) based on whether it is empty BUT only if the value of another control in the same record (a check box) is set to true.

    (this is to highlight the users attention that they need to fill something in - the field will only need be filled in for some records, not all)

    The fields in question are on a subform (continuous)

    Is this possible through the use of an expression (ie. changing the condition from 'field value is' to 'expression is' and referencing the other control)?

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

    Re: Conditional formatting expressions (XP sp1)

    Say that the text box is named txtSomething and the check box is named chkYesNo. As you wrote, you should select "Expression is" in the dropdown list. Then enter the following expression in the box next to it:

    IsNull([txtSomething]) And [chkYesNo]

    The square brackets around the names are important; if you omit them, Access will assume that you meant a string and put quotes around the names.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional formatting expressions (XP sp1)

    I'm not sure what I was trying but I didn't have my 'try the obvious' head on. That does exactly what I need, cheers.

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

    Re: Conditional formatting expressions (XP sp1)

    >> I didn't have my 'try the obvious' head on.

    Try a different userpic? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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