SusanSSS,
The problem is that you changed the code in a way that made the function incorrectly calculate things. To wit,
go to the spot where the elements of the Days array are initialized. You have it as:
' array indicates whether that weekday is a regular workday. Initialize to False Days(1) = False
Days(2) = True
Days(3) = True
Days(4) = True
Days(5) = True
Days(6) = True
Days(7) = True
If you go back to the code I posted in
http://www.experts-exchange.com/Q_25047717.html#26294158, you will
see that all of those elements should be initialized to False:
' array indicates whether that weekday is a regular workday. Initialize to False
Days(1) = False
Days(2) = False
Days(3) = False
Days(4) = False
Days(5) = False
Days(6) = False
Days(7) = False
Change those all to False in the code, and the query will return the right results.
Patrick