Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Conditional formatting issue

    I have a form and a report in Access 2010 that both do essentially the same thing: they both use the same query as a data source, and they both list the same fields.

    I have added conditional formatting to several of the fields in both the form and the report, and this works in both the form and the report, except for one field, where the same conditional formatting expression works in the form but not in the report. (It's not a typo, as I copied/pasted the conditional formatting expressions from the form to the report.)

    Expression is
    [OrderType]=2
    And [Size]>0
    And [Size]<=DLookUp("Threshold","dbo_Parameters")
    And [Level]=1
    And [Item]=DLookUp("Item","dbo_Job","OrderRef="&[Service]&"And JobType=3 And JobStatus=5")

    How can I get this to work in the report as it does in the form?

    (The issue is not in the data, which contains records that trigger the conditional formatting correctly in the form but not at all in the report. The issue appears to be with the DLookUp function in the last term, because if I remove that term, then the rest of the expression triggers the conditional formatting correctly in the report.)
    Last edited by Murgatroyd; 2016-04-17 at 21:37.

  2. #2
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    This was resolved by correcting the syntax.
    Last edited by Murgatroyd; 2016-04-17 at 21:39.

Posting Permissions

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