I'm working on a scheduler and is in need of a way to code a course based on a day shift and a evening shift. I figured out the day shift, but because the evening shift starts at 6PM and ends at 6AM, I can not get the greater than or less than properly set up. The day time is from Monday thru Friday, 8 to 5pm and the evening is from Saturday thru Monday. Check it out, this is part of the evening shift code, when it decide to go to the next day:
TimeBeg = rsClassRoom![TimeEnd]
CDuration = DateAdd("n", rsCourses![TotalClassroomDuration], TimeBeg)
DN = Weekday(DateFrom)
If CDuration > rsShifts!TimeEnd Then
If rsShifts!TimeBeg > rsShifts!TimeEnd Then
If CDuration < #11:59:00 PM# Then
GoTo ByPassShiftRange
End If
End If
' This is to set the days of the shift right
If DN = SDays1 Then
DateFrom = DateFrom + SDays2
L = 0
TimeBeg = rsShifts!TimeBeg
Else
DateFrom = DateFrom + 1
L = 0
TimeBeg = rsShifts!TimeBeg
End If
End If
The times looks like I got those right, but it will only show the first day of the date range. I would like to use it by the hours of the day, such 1 thru 8 hours, instead of calculating the 8AM thru 5PM hours. Please helllllllppppp...