OK, I found the code that I use. I've not had problems with it. It relies on a table to store the holiday dates, which is nice, because then you can give the user an interface to modify that data as needed. I got this from Arvin Meyer. I'm not sure if he posted it to cdma or if I got it from his web site. He's a monster developer. Here it is:
Function AddBusinessDays(datStart As Date, ByVal intDayAdd As Integer)
On Error GoTo Error
'Adds the proper Business day skipping holidays and weekends
'Copyright Arvin Meyer 05/26/98
Dim gDB As Database
Dim rst As Recordset
Dim strSql As String
Set gDB = CurrentDb
Set rst = gDB.OpenRecordset("SELECT [HolDate] FROM tblHoliday", dbOpenSnapshot)
Do While intDayAdd > 0
datStart = datStart + 1
rst.FindFirst "[HolDate] = #" & datStart & "#"
If WeekDay(datStart) <> vbSunday And WeekDay(datStart) <> vbSaturday Then
If rst.NoMatch Then intDayAdd = intDayAdd - 1
End If
Loop
AddBusinessDays = datStart
rst.Close
Set rst = Nothing
Exit Function
Error:
ErrorTrap Err.Number, Err.Description, "AddBusinessDays"
End Function
=============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995
Take a look at the Developer's section of the site for some helpful fundamentals.