[AccessD] Days Past Due - Grace Period

Dan Waters dwaters at usinternet.com
Wed Sep 3 15:24:03 CDT 2003


Virginia,  I added some code into your example.  Would this work?

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hollis,Virginia
Sent: Wednesday, September 03, 2003 1:25 PM
To: 'accessD at databaseadvisors.com'
Subject: [AccessD] Days Past Due - Grace Period


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 
       '-- Show number of days over 5 that the project review is late
       Me.DaysPastDue.Caption = (Date() - DateEntered) + 5 
    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/eb4ea634/attachment-0001.html>


More information about the AccessD mailing list