arnelgp
..forever waiting... waiting for jellybean!
- Local time
- Tomorrow, 03:40
- Joined
- May 7, 2009
- Messages
- 19,229
you have 2018 year, in your table so I adjust it to date() - 1 year.
the date generated by special_qryDatesFromMsysObjects is from jan-1-2018 up to MAY-18-2045, enough for your all your course scheds.
there is one thing you need to change, the function fncInWeekDay() in Module1.
change:
Weekday(dte)
to:
Weekday(dte, 2)
since your start of the week is Monday (2 vbMonday).
if you have another table for holidays, change the function to accommodate your holiday table:
happy sunday!
the date generated by special_qryDatesFromMsysObjects is from jan-1-2018 up to MAY-18-2045, enough for your all your course scheds.
there is one thing you need to change, the function fncInWeekDay() in Module1.
change:
Weekday(dte)
to:
Weekday(dte, 2)
since your start of the week is Monday (2 vbMonday).
if you have another table for holidays, change the function to accommodate your holiday table:
Code:
Public Function fncInWeekDay(ByVal dte As Date, strWeekDay As String) As Boolean
Dim intCount As Integer
fncInWeekDay = (InStr(1, strWeekDay, Weekday(dte, 2) & "") > 0)
intCount = Nz(DCount("1", "holidayTable", "holidayField=#" & Format(dte, "mm/dd/yyyy") & "#"), 0)
fncInWeekDay = (fncInWeekday And (intCount = 0))
End Function
Last edited: