Results 1 to 4 of 4
  1. #1
    SunTop is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Aug 2016
    Posts
    93

    Conditional formatting expression


    Hello Everyone
    I have a Text Box control on my form that I want to apply conditional formatting to. The problem I am facing is that, when I am writing the conditional formatting expression and I refer to a field in a table or a query outside my form, the conditional formatting is not applied, but when I refer to a control on my form, the conditional formatting works fine. What am I doing wrong here ?

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    How exactly are you trying to reference fields that are not on your Form?
    What is your Conditional Formatting formula?
    Why not just add the field you need in the Query that your Form is based on?

  3. #3
    SunTop is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Aug 2016
    Posts
    93
    Thanks for your reply JoeM

    I am using this expression on the conditional formatting of a Text Box control on my form [WorkOrders]![ExpiryDate] < Date(). I don't want to put the ExpiryDate field in the underlying query of my form because I want to get unique values of another field (through setting the unique values property in the query properties) and if I put the expiry date then I will not get unique values.

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Since the field is not part of the Record Source of the Form, you cannot call it like that.
    Have you tried using the DLOOKUP function to bring that value into your Form?
    I have seen people use that method with Conditional Formatting to get fields that are not part of their Record Source.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 08-30-2016, 05:43 AM
  2. Access Form Conditional Formatting Expression
    By mrmmickle1 in forum Programming
    Replies: 1
    Last Post: 08-03-2016, 02:01 PM
  3. Replies: 18
    Last Post: 01-07-2016, 11:37 PM
  4. Replies: 5
    Last Post: 03-14-2012, 08:32 PM
  5. conditional formatting expression
    By kroenc17 in forum Programming
    Replies: 2
    Last Post: 10-22-2010, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums