<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1226" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=566084019-04092003><FONT face=Arial color=#0000ff
size=2>Virgina,</FONT></SPAN></DIV>
<DIV><SPAN class=566084019-04092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV><SPAN class=566084019-04092003><FONT face=Arial
color=#0000ff size=2></FONT></SPAN>
<DIV></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN class=566084019-04092003><FONT
face=Arial color=#0000ff>Oops! Use - 5 instead of +5 (or -4 or
-6). Also, avoid using the Now() function unless you really need
the time component, and I don't think you do here. However, I've seen
the situation where Date() didn't work on some older computers but Now()
always did. To fix that I you can paste this function into a standard
module, and just use CurrentDate where ever you would have used Date() or
Now().</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=566084019-04092003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=566084019-04092003></SPAN></FONT></FONT><FONT><SPAN
class=566084019-04092003><FONT face=Tahoma
size=1> Public
Function CurrentDate() As
Date<BR> On
error GoTo EH</FONT></SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT><SPAN class=566084019-04092003><FONT face=Tahoma
size=1> CurrentDate = DatePart("m", Now()) & "/" &
DatePart("d", Now()) & "/" & DatePart("yyyy",
Now())<BR> Exit Function</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Tahoma size=1></FONT> </DIV>
<DIV><FONT><SPAN class=566084019-04092003><FONT face=Tahoma><FONT
size=1>EH:<BR> Application.Echo True<BR>
'Call GlobalErrors("", Err.Number, Err.Description, CurrentObjectName,
"CurrentDate")<BR> <BR>End
Function </FONT></FONT></SPAN></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=Tahoma><FONT color=#0000ff size=2><SPAN
class=566084019-04092003>Now for Holidays - You need to create a table for
Holidays that your client will add to once a year in December. The
reason for this is that many companies don't use all the Federal holidays, and
many have their own Holidays which they change every year (i.e., July 3 or July
5 or neither?). No way you as a developer will know what they're going to
do in the coming years. Once this table is populated, your Holiday
checking code can use it to skip the correct Holidays for that company. If
they forget to add in the Holidays, it's their issue which they can quickly
fix.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=566084019-04092003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT color=#0000ff size=2><SPAN
class=566084019-04092003>I believe that the ADH has code (on the discs) which
will skip Weekends. You'll need to modify that code and/or add to it to
exclude Holidays listed in the Holiday table.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT color=#0000ff size=2><SPAN
class=566084019-04092003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT color=#0000ff size=2><SPAN
class=566084019-04092003>Good Luck!</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT color=#0000ff size=2><SPAN
class=566084019-04092003>Dan</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=566084019-04092003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=566084019-04092003></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=566084019-04092003> </SPAN>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of
</B>Hollis,Virginia<BR><B>Sent:</B> Thursday, September 04, 2003 5:33
AM<BR><B>To:</B> 'Access Developers discussion and problem
solving'<BR><B>Subject:</B> RE: [AccessD] Days Past Due - Grace
Period<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=410272811-04092003>Ok,
I changed the query to the below code, is this the correct way to do
this?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=410272811-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=410272811-04092003>PastDue:
DateDiff("d",[DateEntered],Now())-5</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=410272811-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=410272811-04092003>Oh!
Get this, I just got an email from mgmt, they want the days past due
to count "Buisness Days only". So it does not count weekends &
holidays!! I can't figure out how to make it count to 5 let alone skip
weekends. :-(</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=410272811-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=410272811-04092003>Va.</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Hollis,Virginia
[mailto:HollisVJ@pgdp.usec.com]<BR><B>Sent:</B> Thursday, September 04, 2003
6:15 AM<BR><B>To:</B> 'Access Developers discussion and problem
solving'<BR><B>Subject:</B> RE: [AccessD] Days Past Due - Grace
Period<BR><BR></DIV></FONT>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=800320711-04092003>No, that did not work. For a project that was
entered 8/27/03, it shows 12.522 days. The old code shows it 8 days past
due, but I need it to show 3 days past due.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=800320711-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=800320711-04092003>I
hope someone can help me with this because I had a user complain to upper
mgmt about this, and it is causing me problems.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=800320711-04092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=800320711-04092003>Va.</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Dan Waters
[mailto:dwaters@usinternet.com]<BR><B>Sent:</B> Wednesday, September 03,
2003 3:24 PM<BR><B>To:</B> 'Access Developers discussion and problem
solving'<BR><B>Subject:</B> RE: [AccessD] Days Past Due - Grace
Period<BR><BR></DIV></FONT>
<DIV><SPAN class=924281920-03092003><FONT face=Arial color=#0000ff
size=2>Virginia, I added some code into your example. Would
this work?</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of
</B>Hollis,Virginia<BR><B>Sent:</B> Wednesday, September 03, 2003 1:25
PM<BR><B>To:</B> 'accessD@databaseadvisors.com'<BR><B>Subject:</B>
[AccessD] Days Past Due - Grace Period<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=920580919-03092003>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.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=920580919-03092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=920580919-03092003>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.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=920580919-03092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=920580919-03092003>Virginia</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=920580919-03092003>***************</SPAN></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><SPAN class=920580919-03092003>Used
in the query to de</SPAN><SPAN
class=920580919-03092003>termine </SPAN><SPAN
class=920580919-03092003>the number of days past
due:</SPAN></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><SPAN
class=920580919-03092003></SPAN>PastDue:
DateDiff("d",[DateEntered],Now())</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=920580919-03092003>OnCurrent of the form:</SPAN></FONT></DIV>
<DIV>If DateEntered <= DateAdd("d", -5, Date) And StatusID = 1 Then
'Status is pending and review is 5 days past
due.<BR> Me!DateEntered.ForeColor =
lngRed 'Date entered is red<BR>
Me!LateDate.Visible = True ' Show the sad
face<BR> Me.DaysPastDue.Visible =
True 'Show past due label<SPAN class=924281920-03092003><FONT face=Arial
color=#0000ff size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=924281920-03092003><FONT face=Arial color=#008000
size=2> '-- Show number of days over
5 that the project review is late</FONT></SPAN></DIV>
<DIV><SPAN class=924281920-03092003><FONT face=Arial color=#0000ff
size=2> Me.DaysPastDue.Caption =
(Date() - DateEntered) + 5</FONT></SPAN><SPAN
class=924281920-03092003> </SPAN><BR>
Else<BR>
Me!DateEntered.ForeColor = lngBlack 'Review is not past due, Date
Entered is black<BR>
Me!LateDate.Visible = False 'No sad
face<BR>
Me.DaysPastDue.Visible = False 'No past due label.<BR>
End If</DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>