Article ID: 149127
Article Last Modified on 1/19/2007
Table: Holidays
-----------------------
Field Name: Description
Data Type: Text
Field Name: HoliDate
Date Type: Date/Time
Description HoliDate
--------------------------------------------
New Year's Day 1/1/96
Martin Luther King, Jr. Day (USA) 1/15/96
Memorial Day (observed-USA) 5/27/96
Labor Day (USA) 9/2/96
Function OfficeClosed(TheDate) As Integer
OfficeClosed = False
' Test for Saturday or Sunday.
If WeekDay(TheDate) = 1 Or WeekDay(TheDate) = 7 Then
OfficeClosed = True
' Test for Holiday.
ElseIf Not IsNull(DLookup("HoliDate", "Holidays", "[HoliDate]=#" _
& TheDate & "#")) Then
OfficeClosed = True
End If
End Function
? OfficeClosed(#9/2/96#)
DueDate=OrderDate+30
Do While OfficeClosed(DueDate)
DueDate=DateDue+1
Loop
Keywords: kbhowto kbprogramming kbusage KB149127