Conditional formatting in a continuous form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OllyJ
    New Member
    • Dec 2007
    • 50

    Conditional formatting in a continuous form

    Hi guys,

    I want my 'Hours' record within my continuous form to be red background if the 'Category' section for that entry is set to 'Absent'. I am using this form as a subform within a main form.

    I have tried when expression is...

    [Forms]![FrmHoursSubform]![Category]="Holiday"

    and...

    [Forms]![FrmHoursRpt].[FrmHoursSubform]![Category]="Holiday"

    ...ANY IDEAS WHERE IM GOING WRONG (probably something simple!)
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by OllyJ
    Hi guys,

    I want my 'Hours' record within my continuous form to be red background if the 'Category' section for that entry is set to 'Absent'. I am using this form as a subform within a main form.

    I have tried when expression is...

    [Forms]![FrmHoursSubform]![Category]="Holiday"

    and...

    [Forms]![FrmHoursRpt].[FrmHoursSubform]![Category]="Holiday"

    ...ANY IDEAS WHERE IM GOING WRONG (probably something simple!)
    If [FrmHoursRpt] is your main form and [FrmHoursSubform] is your subform control, then reference syntax should be:


    [Forms]![FrmHoursRpt]![FrmHoursSubform].Form![Category]="Holiday"

    Comment

    • OllyJ
      New Member
      • Dec 2007
      • 50

      #3
      I have tried the conditional formatting;

      expression is...

      [Forms]![FrmHoursRpt]![FrmHoursSubform].Form![Category]="Holiday"

      but it doesn't work...

      i have also tried applying conditional formatting 'on current' of form using the expression above and it does not work either, any ideas???

      Comment

      • OllyJ
        New Member
        • Dec 2007
        • 50

        #4
        Sorted, after all this time I just had to put expression is...

        [Category] = "Holiday"!

        Comment

        Working...