Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    126

    Unanswered: Conditional Colors in subForm

    Using XP and Access03.
    A subform has two fields visible: a combobox with a SubjectName and a Year field. I already have conditional formatting on the year field with current year one color, next year another color, and all others a third color.
    I now want the subject field to format based on two boolean fields that are in the source query but not displayed. I've checked the query behind the subform and it shows the two booleans "required" and "recommended" correctly.
    I opened the Format/Conditional dialog, pick Expression and since they are boolean, set Condition 1 to "sourcequery.required", Condition 2 to "sourcequery.recommended AND NOT sourcequery.required . Opening the form, the colors aren't displayed. Any idea why?
    PGT

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Fields cannot be referenced using sourcequery.required and sourcequery.recommended. In ConditionalFormatting, assuming that they are part of the Form's underlying RecordSet, you'd simply use

    [required] and [recommended]

    Note that the Square Brackets are Required in Conditional Formatting, as they are when using Fields in a calculated Control Source!

    Linq ;0)>
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Aug 2006
    Posts
    126
    I can never keep the . ! [ ] ' ' " " rules straight. When somethiing doesn't work, I usually try something else. Forgot this one completely. Everything works.
    Thanks
    Pete
    PGT

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Once again, glad we could help!

    Linq ;0)>
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

Tags for this Thread

Posting Permissions

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