Results 1 to 5 of 5
  1. #1
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188

    Conditional formatting date control based on null

    Hi,


    I have two controls in a form I'd like to base my conditional formatting on. Both are date fields. The first one will turn red if the date is past 42 days. I got that part. I just used Now()+42. But what I need to do next is remove the conditional formatting if the second field is NOT NULL....so once someone enters text into the second field the first date field will not be red. How do I do that?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Should probably use Date() instead of Now().

    If you want highlight when date field is > Date() +42 AND second field is null, try:

    Expression is: [date field] > Date() + 42 AND IsNull([other field])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    Quote Originally Posted by June7 View Post
    Should probably use Date() instead of Now().

    If you want highlight when date field is > Date() +42 AND second field is null, try:

    Expression is: [date field] > Date() + 42 AND IsNull([other field])
    Thanks, that works great! Another question - how do I write the expression if the date is between 27 and 41 days?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    [date field] BETWEEN Date() + 27 AND Date() + 41 AND IsNull([other field])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    matey56 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    188
    It's working. Thanks so much for your help.

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

Similar Threads

  1. Replies: 11
    Last Post: 11-25-2016, 07:26 PM
  2. Replies: 7
    Last Post: 03-26-2015, 09:20 AM
  3. Conditional Formatting Based On Another Column
    By Rustin788 in forum Reports
    Replies: 3
    Last Post: 08-13-2014, 01:52 PM
  4. conditional formatting or control source?
    By Rujahin in forum Reports
    Replies: 3
    Last Post: 04-08-2014, 03:37 PM
  5. Replies: 5
    Last Post: 03-14-2012, 08:32 PM

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