Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    1

    Unanswered: need help with expression in access 2007

    this is my situation, i have three fields in a query
    susp days
    rec'd date
    susp act date

    the [susp days] is either "1 day", "4 days", or "10 days"

    the [rec'd date] is the actual date the record was entered

    the [susp act date] is the date the suspense is due based on which selection was made in the susp days drop down box which is 1 day, 4 days, or 10 days added to the rec'd date.

    ok i have a report that shows the rec'd date, the susp days and the susp act date. i need help with an expression to turn the susp act date red in report when a "4 days" is selected the susp act date needs to turn red in 3 days. If the "10 days" was selected the susp act date needs to turn red in 8 days. i wrote the "1 day" where it turns red instantly but this is what im trying to do with the other two.


    can i do something like this? [susp days]="4 days", DateDiff("d",[susp act date],Date())<=3

    [susp days]="10 days", DateDiff("d",[susp act date],Date())<=8

    i know the above is wrong..im a novice programmer but u get the idea?

    thanks a million for your help....

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Welcome to the forums

    I'd suggest having a look at conditional formatting. If that isn't sufficient, you may need to write VBA to format, a more advanced approach but also more flexible (see here for a start on it).

    Let us know if that gets you what you're after or not.
    Me.Geek = True

Posting Permissions

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