Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162

    Conditional formatting

    Have a problem not sure how to solve, and the standard conditional formatting doesn't seem to work, that i can see.

    I produce accounts and for legal reasons they are on a set schedule in which they have to be completed, otherwise a special notice has to go out.

    so these are the fields:

    [Date] - this is today's date from the system
    [Y/E Date] - Year end date for which accounts being produced
    [Account deadline date] this is always set 4 months after the year end
    [Notice Date] - This is always set 1 month before the final 6 months (or 1 month after[Account deadline date] date)
    [Notice Sent] - This is the date actual notice was sent, where accounts could not be produced in time
    [Approved Date] - This is the date the accounts were approved, signed and returned.

    So i need two things to happen.

    1) [Account deadline date] this needs to go Red if system date is higher than [Account deadline date] and no [Approved Date] or [Notice Sent] has been entered, this would go back to normal color if . [Approved Date] or [Notice Sent] has been entered

    2) [Notice Date] needs to go Amber once the [Account deadline date] has been reach and no [Approved Date] or [Notice Date] has NOT been entered and then red once the [Notice Date] has been reach and the [Approved Date] nor [Notice Date] has NOT has been entered. Or then back to normal color if [Approved Date] or the [Notice Sent] has been entered



    Hope that all makes sense and someone can help.

    Thanks

    Keith

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    so your conditional formatting would be EXPRESSION IS

    and then you'd have something like
    (date() > [Account deadline date]) AND (isnull([approved date]) AND isnull([NOTICE SENT]))

    you're not limited to dealing with one field when performing a conditional formatting check.

  3. #3
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    So let me get this right, in the conditional formatting build an expression as you state above, will give it and try and will post results

    Thanks

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    that was a crack at the statement for your first condition, you'd have to build a secondary condition for your second requirement but yes, it should

  5. #5
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Hi Got the code as this (Date()>[Account deadline date]) And (IsNull([Accounts Sent to Residents]) And IsNull([Section 20B Sent]))

    sys date is 24/01/2014 abd deadline date is 30/11/2013 so this should now go red but its not, I also tried IsEmpty with no luck any ideas what I am doing wrong here?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Review: http://allenbrowne.com/ser-36.html

    Maybe:

    CDate(Format(Date(), "mm/dd/yyyy"))>[Account deadline date] And IsNull([Accounts Sent to Residents]) And IsNull([Section 20B Sent])

    or

    Format(Date(), "mm/dd/yyyy")>Format([Account deadline date], "mm/dd/yyyy") And IsNull([Accounts Sent to Residents]) And IsNull([Section 20B Sent])
    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.

  7. #7
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Tried both the dates are different on each record just so you are aware, and the dates are displayed in the correct english format anyway so not sure the date formatting is actually required.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You show system date in non-US (non-Access standard) structure. The display format has nothing to do with the way Access stores date value, assuming the field is a date/time type.
    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.

  9. #9
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Hi I tried that anyway and deadline date still not turning red when the other two fields have no date entered. At a lost at the moment

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Lets narrow down the possible cause of failure. Try a condition expression without the date part. Try with only the date part.
    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.

  11. #11
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Value < Date() works fine and field Turns Red

    Here i used the standard formatting Field Value Is - Less Than - Date()

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Use: Expression Is
    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.

  13. #13
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    (Date()>[Account Deadline])

    Works fine

  14. #14
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Now try the IsNull parts without the date condition.
    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.

  15. #15
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    (Date()>[Account deadline date]) And (IsNull([Accounts Sent to Residents])

    I then entered this and it no longer go RED when there is no date in the Residents Field (When it should)

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 05-26-2013, 09:10 PM
  2. Conditional Formatting
    By mm07nkb in forum Forms
    Replies: 1
    Last Post: 09-02-2011, 09:58 AM
  3. Conditional formatting
    By avarusbrightfyre in forum Forms
    Replies: 3
    Last Post: 07-01-2011, 11:18 AM
  4. conditional formatting right(..)
    By bbeernaert in forum Access
    Replies: 3
    Last Post: 08-25-2010, 12:33 AM
  5. Conditional Formatting
    By cevatyildiz in forum Forms
    Replies: 8
    Last Post: 04-30-2010, 12:01 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