[AccessD] Days Past Due - Grace Period

Hollis,Virginia HollisVJ at pgdp.usec.com
Wed Sep 3 14:25:19 CDT 2003


A project review must be completed within 5 days. If a project review is
over 5 days past due and the status is Pending, a label shows "Past Due &
the number of days it is past due". The Past Due date is based on the date
the record was entered into the system.
 
Problem: I need the past due label to show not the days past due from the
DateEntered, but count the days Over 5. For example, the project was entered
8/28/2003, once the project is >= 5 days past 8/28/2003 or on 9/4/2003 the
label shows this project is past due 6 days. What I really need is the label
to show it is past due 1 day, because they do have a 5 day grace period. I
use this on forms & the reports.
 
Virginia
 
***************
Used in the query to determine the number of days past due:
PastDue: DateDiff("d",[DateEntered],Now())
 
OnCurrent of the form:
If DateEntered <= DateAdd("d", -5, Date) And StatusID = 1 Then 'Status is
pending and review is 5 days past due.
       Me!DateEntered.ForeColor = lngRed 'Date entered is red
       Me!LateDate.Visible = True ' Show the sad face
       Me.DaysPastDue.Visible = True 'Show past due label
    Else
        Me!DateEntered.ForeColor = lngBlack 'Review is not past due, Date
Entered is black
        Me!LateDate.Visible = False 'No sad face
        Me.DaysPastDue.Visible = False 'No past due label.
    End If
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030903/d14758b1/attachment.html>


More information about the AccessD mailing list